Najibullah Ahmadzai (Pashto: ډاکټر نجیب ﷲ احمدزی; February 1947 – 27 September 1996), commonly known as Najibullah or Dr. Najib, was the President of Afghanistan from 1987 until 1992, when the mujahideen took over Kabul. He had previously held different careers under the People's Democratic Party of Afghanistan (PDPA) and was a graduate of Kabul University. Following the Saur Revolution and the establishment of the Democratic Republic of Afghanistan, Najibullah was a low profile bureaucrat: he was sent into exile as Ambassador to Iran during Hafizullah Amin's rise to power. He returned to Afghanistan following the Soviet intervention which toppled Amin's rule and placed Babrak Karmal as head of state, party and government. During Karmal's rule, Najibullah became head of the KHAD, the Afghan equivalent to the Soviet KGB. He was a member of the Parcham faction led by Karmal.
During Najibullah's tenure as KHAD head, it became one of the most brutally efficient governmental organs. Because of this, he gained the attention of several leading Soviet officials, such as Yuri Andropov, Dmitriy Ustinov and Boris Ponomarev. In 1981, Najibullah was appointed to the PDPA Politburo. In 1985 Najibullah stepped down as state security minister to focus on PDPA politics; he had been appointed to the PDPA Secretariat. Mikhail Gorbachev, the last Soviet leader, was able to get Karmal to step down as PDPA General Secretary in 1986, and replace him with Najibullah. For a number of months Najibullah was locked in a power struggle against Karmal, who still retained his post of Chairman of the Revolutionary Council. Najibullah accused Karmal of trying to wreck his policy of National Reconciliation, which were a series of efforts by Najibullah to end the conflict.