After the 1978 coup in which President Mohammed Daoud Khan was ousted and killed, Tanai was appointed head of Military Intelligence. He survived through the years of bloodshed that followed during the Saur Revolution. His first appointment was of Commander of the Kabul garrison.