Born in 1941, Sarwari was a member of the Khalq-wing of the communist People’s Democratic Party of Afghanistan (PDPA), which came to power through a putsch in April 1978. The Khalq- ("people") wing was tangled up in constant in-fighting with the Parcham- ("banner") wing of the PDPA.
From 1 April 1979 on, Sarwari was the chief of the secret police AGSA (Afghanistan Gattho Satunkai Aidara/ Afghanistan Interests Safeguarding Administration), the predecessor organisation to the KhAD, (Khedamat-e Etelea'at-e Dawlati) the regime's secret police set up in 1980 to suppress its internal opponents.
Sarwari was involved in the attempted assassination of Prime Minister Hafizullah Amin, but had to flee to the USSR, after the plot failed. After the December 1979 Soviet invasion in Afghanistan, Sarwari returned, and became Vice President, Vice Prime Minister and Minister for Transport in the Soviet-backed government of Babrak Karmal. In January 1980, Sarwari also became a member of the Politbureau of the PDPA.
In June 1980, however, Sarwari's political career was cut short due to the political in-fighting in the PDPA. President Karmal (Parcham-wing) had him removed from his posts and sent to Mongolia as ambassador.
Several thousands of political opponents were tortured and killed under the various branches of the Afghan security and secret services during the communist regime in the 1980s. Sarwari was reported to have personally tortured high-ranking political opponents.
Sarwari is reported to have been detained since 1992, when Mujahideen factions overthrew the Soviet-backed communist regime in Kabul.