These uprisings, along with internal fighting and coups within the government between the People’s and Banner factions, prompted the Soviets to invade the country in December 1979, sending in some 30,000 troops and toppling the short-lived presidency of People’s leader Hafizullah Amin. The aim of the Soviet operation was to prop up their new but faltering client state, now headed by Banner leader Babrak Karmal, but the mujahideen rebellion grew in response, spreading to all parts of the country. The Soviets initially left the suppression of the rebellion to the Afghan army, but the latter was beset by mass desertions and remained largely ineffective throughout the war.