In August 1983, Shagari and the NPN were returned to power in a landslide victory, with a majority of seats in the National Assembly and control of 12 state governments. But the elections were marred by violence, and allegations of widespread vote rigging and electoral malfeasance led to legal battles over the results.
On December 31, 1983, the military overthrew the Second Republic. Maj. Gen. Muhammadu Buhari emerged as the leader of the Supreme Military Council (SMC), the country's new ruling body. He charged the civilian government with economic mismanagement, widespread corruption, election fraud, and a general lack of concern for the problems of Nigerians. He also pledged to restore prosperity to Nigeria and to return the government to civilian rule but was stymied in his attempt to deal with Nigeria's severe economic problems. Despite relative popularity for its no-nonsense approach in tackling corruption, the Buhari government was peacefully overthrown by the SMC's third-ranking member, Army Chief of Staff Maj. Gen. Ibrahim Babangida, in August 1985.
Babangida moved to restore freedom of the press and to release political detainees being held without charge. As part of a 15-month economic emergency, he announced stringent pay cuts for the military, police, and civil servants and enacted similar cuts for the private sector. Imports of rice, corn, and wheat were banned. Babangida orchestrated a national debate on proposed economic reform and recovery measures, which reportedly convinced him of intense opposition to an economic recovery package dependent on an International Monetary Fund (IMF) loan.