Nigeria
Nigeria regained democracy in 1999 when it elected Olusegun Obasanjo, the former military head of state, as the new President of Nigeria. This ended almost 33 years of military rule (from 1966 until 1999), excluding the short-lived second republic (between 1979 and 1983) by military dictators who seized power in coups d'état and counter-coups during the Nigerian military juntas of 1966–1979 and 1983–1998. Although the elections which brought Obasanjo to power in 1999 and again in 2003 were condemned as unfree and unfair, Nigeria has shown marked improvements in attempts to tackle government corruption and to hasten development.

Q: Nigeria was under military rule for how long?
almost 33 years