After the People's Democratic Party of Afghanistan (PDPA) sized power after the Saur Revolution (1978), he was Minister of Education and later Minister of Public Works under Nur Mohammad Taraki. He held the job as Minister of Public Works until Hafizullah Amin rose to power in 1979 after his assassination of Taraki. Under the rule of Babrak Karmal he was promoted to the Central Committee's Politburo. While seen by many as a Khalqi, he was given the position of Chairman of the Party Control Commission.