section_path: History/Second Republic and military dictatorship
section_name: Second Republic and military dictatorship
paragraph_text: Second Republic and military dictatorship
  
  The military carefully planned the return to civilian rule putting in place measures to ensure that political parties had broader support than witnessed during the first republic. In 1979, five political parties competed in a series of elections in which Alhaji Shehu Shagari of the National Party of Nigeria (NPN) was elected president. All five parties won representation in the National Assembly. On 1 October 1979, Shehu Shagari was sworn in as the first President and Commander-in-Chief of the Federal Republic of Nigeria. Obasanjo peacefully transferred power to Shagari, becoming the first head of state in Nigerian history to willingly step down.
  
  The Shagari government became viewed as corrupt by virtually all sectors of Nigerian society. In 1983, the inspectors of the state-owned Nigerian National Petroleum Corporation began to notice "the slow poisoning of the waters of this country". 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. There were also uncertainties, such as in the first republic, that political leaders may be unable to govern properly.
  
  The 1983 military coup d'état was coordinated by key officers of the Nigerian military and led to the overthrow of the government and the installation of Major General Muhammadu Buhari as head of state. The military coup of Muhammadu Buhari shortly after the regime's re-election in 1984 was generally viewed as a positive development. In 1985, Ibrahim Babangida overthrew Buhari in a coup d'état. In 1986, Babangida established the Nigerian Political Bureau which made recommendations for the transition to the Third Nigerian Republic. In 1989, Babangida started making plans for the transition to the Third Nigerian Republic. Babangida survived the 1990 Nigerian coup d'état attempt, then postponed a promised return to democracy to 1992.