Question: For how long was Nigeria ruled by military control?
About the article "Nigeria", section "Democratization (1999-)".

Candidate passages:
After gaining independence in 1960 from Great Britain, Nigeria fell prey to civil war and the first of many military coups in 1966.
Democracy was briefly restored from 1979 to 1983, but for most of its independent history, Nigeria was ruled by a series of military juntas.
The last major military ruler, Gen. Sani Abacha, died suddenly in 1998.
His successor, Gen. Abdulsalami Abubakar promised a transition to democracy, and accordingly a new constitution was adopted on May 5th, 1999.
Elections were held and retired Gen. Olusegun Obasanjo, who had previously governed Nigeria as a military ruler, was elected the new president.
The end of military rule brought about a new era of regular elections as well as the return of civil liberties, free press and an end to arbitrary arrests and torture, although human rights violations still occur regularly.
Nigeria also began a long campaign against the bureaucratic and military corruption that had paralysed its economy and severely tarnished its international reputation.  
Shagari, however, was overthrown in a bloodless coup in 1983, and succeeded by Muhammadu Buhari, who was appointed "Chairman of the Supreme Military Council of Nigeria" and Commander-in-Chief of the Armed Forces by the junta.
Buhari ruled for two years, until 1985, when he was overthrown by General Ibrahim Babangida, who appointed himself with the position of "President of the Armed Forces Ruling Council of Nigeria".
Babangida promised a return of democracy when he seized power, which barely took place during the Babangida regime.
He ruled Nigeria until 1993 when he temporarily handed power to the interim head of state Ernest Shonekan, being part of his promise to return democracy.
Two months later, however, Shonekan was overthrown by General Sani Abacha, with former President Babangida conveniently involved with a visit to Egypt.
Abacha appointed himself "Chairman of the Provisional Ruling Council of Nigeria".
After Abacha's death in 1998, General Abdulsalami Abubakar took over, and ruled until 1999 when Olusẹgun Ọbasanjọ again became head of state (via an election), and ended the junta.
Olusegun Obasanjo ruled until 2007 and then passed it down to another democratically elected president Umaru Musa Yar'adua who ruled Nigeria until his death in 2010. 
The discovery of oil in Nigeria caused conflict within the state.
The emergence of commercial oil production from the region in 1958 and thereafter raised the stakes and generated a struggle by the indigenes for control of the oil resources.
The northern hegemony, ruled by Hausa and Fulani, took a military dictatorship and seized control of oil production.
To meet popular demands for cheaper food during the inflationary period just after the civil war, government created a new state corporation, the National Nigerian Supply Company (NNSC).
While oil production proceeded, the region by the 1990s was one of the least developed and most poor.
The local communities responded with protests and successful efforts to stop oil production in the area if they did not receive any benefit.
By September 1999, about 50 Shell workers had been kidnapped and released.
Not only are the people of Nigeria affected, but the environment in the area is also affected by deforestation and improper waste treatment.
Nigerian oil production also faces problems with illegal trade of the refined product on the black market.
This is undertaken by authorized marketers in collusion with smuggling syndicates.
Activities such as these severely affect the oil industries of both the state and MNCs.
Oil production deferments arising from community disturbances and sabotage was 45mm barrels in 2000 and 35mm barrels in 2001.
The state has not been a very effective means of controlling incursions such as these.
The illegal oil economy in such a circumstance may continue to exist for a long time, albeit incurtailed and small scales. 
The Supreme Military Council was the body that ruled Nigeria after the coup d'état on December 31, 1983.
Its chairman was the head of state. 
The military of Nigeria has played a major role in the country's history, often seizing control of the country and ruling it for long periods of time.
Its last period of rule ended in 1999, following the death of the leader of the previous military junta Sani Abacha in 1998.
Active duty personnel in the three Nigerian armed services totals approximately 76,000.
The Nigerian Army, the largest of the services, has about 60,000 personnel, deployed between two mechanized infantry divisions, one composite division (airborne and amphibious), the Lagos Garrison Command (a division-size unit), and the Abuja-based Brigade of Guards.
It has demonstrated its capability to mobilize, deploy, and sustain battalions in support of peacekeeping operations in Liberia, the former Yugoslavia, Angola, Rwanda, Somalia, and Sierra Leone.
The Nigerian Navy (7,000) is equipped with frigates, fast attack craft, convettes, and coastal patrol boats.
The Nigerian Air Force (9,000) flies transports, trainers, helicopters, and fighter aircraft; however, most of their vehicles are currently not operational.
Nigeria also has pursued a policy of developing domestic training and military production capabilities.
Nigeria has continued a strict policy of diversification in its military procurement from various countries.
After the imposition of sanctions by many Western nations, Nigeria turned to the People's Republic of China, Russia, North Korea, and India for the purchase of military equipment and training.