The foundations of the conflict were laid by the Saur Revolution, a 1978 coup wherein Afghanistan's communist party took power, initiating a series of radical modernization and land reforms throughout the country. These reforms were deeply unpopular among the more traditional rural population and established power structures. The repressive nature of the "Democratic Republic", which vigorously suppressed opposition and executed thousands of political prisoners, led to the rise of anti-government armed groups; by April 1979, large parts of the country were in open rebellion. The communist party itself experienced deep internal rivalries between the Khalqists and Parchamites; in September 1979, People's Democratic Party General Secretary Nur Mohammad Taraki was assassinated under orders of the second-in-command, Hafizullah Amin, which soured relations with the Soviet Union. With fears rising that Amin was planning to switch sides to the United States, the Soviet government, under leader Leonid Brezhnev, decided to deploy the 40th Army across the border on December 24, 1979. Arriving in the capital Kabul, they staged a coup (Operation Storm-333), killing General Secretary Amin and installing Soviet loyalist Babrak Karmal from the rival faction Parcham. The deployment had been variously called an "invasion" (by Western media and the rebels) or a legitimate supporting intervention (by the Soviet Union and the Afghan government) on the basis of the Brezhnev Doctrine.