Khan is killed in a communist coup. Nur Mohammad Taraki, one of the founding members of the Afghan Communist Party, takes control of the country as president, and Babrak Karmal is named deputy prime minister. They proclaim independence from Soviet influence, and declare their policies to be based on Islamic principles, Afghan nationalism and socioeconomic justice. Taraki signs a friendship treaty with the Soviet Union. But a rivalry between Taraki and Hafizullah Amin, another influential communist leader, leads to fighting between the two sides.
At the same time, conservative Islamic and ethnic leaders who objected to social changes introduced by Khan begin an armed revolt in the countryside. In June, the guerrilla movement Mujahadeen is created to battle the Soviet-backed government.