Answer
The communist regime of Afghanistan was ended in 1992, making Rabbani the President of Afghanistan. This was the result of a civil war that had been ongoing since 1978. The war had been fought between the communist government and the Mujahideen, a group of Islamic rebels. The Mujahideen were eventually successful in overthrowing the government and establishing a new one.