By Sola Odunfa
BBC Focus On Africa magazine
When President Olusegun Obasanjo leaves office at the end of May, Nigeria would have achieved its first democratic transfer of power from one civilian administration to another - in spite of the reluctance of the outgoing administration.
Obasanjo's efforts to stand again have been thwarted
For two years, Nigerians stood up in unusual unity against a bid by Mr Obasanjo to have the nation's constitution amended to extend his tenure by another term of four years - in order, his supporters claimed, to allow him to complete his reform programme.
And the people won a significant victory when the Senate threw out the constitutional amendment bill in May last year.
That struggle taught Nigerians the important lesson that democracy would survive only if they applied themselves to protecting and nurturing it.
Vigilance and distrust of government's motives became the watchword - and in a sense, this would be counted as one of the major legacies of Obasanjo's eight-year tenure.
At the time of his swearing-in in 1999, many Nigerians were cynical about the chances of the government lasting this long.
The fear of the military staging a comeback hung thick in the air. The president himself must have sensed it, because his very first action in office was the unexpected but tactical retirement of all military chiefs and their immediate replacement.
That action was followed by the retirement of all military officers who had held political appointments in the preceding military regime.
The steps were widely applauded and they sent a clear message to the barracks and officers' messes that the military must henceforth subject itself to control by civil government.
Umaru Musa Yar'Adua is Obasanjo's 'anointed' successor
For the first time since independence in 1960, Nigeria has now had democratic governance for eight uninterrupted years.
A hallmark of the Obasanjo presidency has been the emphasis placed on curbing official corruption.
From his very first day in office the president promised that it would no longer be "business-as-usual". He set up the Economic and Financial Crimes Commission (EFCC) and installed at its head Nuhu Ribadu, then an assistant commissioner of police.
A measure of Mr Ribadu's success in at least instilling a consciousness of the anti-corruption war in the minds of Nigerians is reflected in the popular saying on the streets that "the fear of Ribadu is the beginning of wisdom".
But he has done much more. For the first time in the history of Nigeria highly-placed persons in both the public and private sectors are being investigated and brought to justice.
The EFCC has prosecuted government ministers. It arrested a sitting head of the Nigeria Police Force, prosecuted him for stealing government funds, recovered the stolen funds from him and got the court to imprison him.
But it has also been criticised for indulging in selective investigations, and this complaint became more strident in the build-up to April's presidential and general elections.
The commission was accused of being used as an instrument to harass and blackmail opponents of Mr Obasanjo and the ruling People's Democratic Party (PDP).
Mr Obasanjo's economic reform programme, meanwhile, may have earned him accolades abroad, but it has little support outside government corridors at home.
The effects of the programme have been worsening unemployment, spiralling prices of food, higher housing rent and the near collapse of the power sector which, in effect, cripples small businesses.
Nigeira's oil-rich deltas are becoming highly dangerous areas
The respected Nigerian economist Sam Aluko has said of the president, "his philosophy is that government must withdraw; an economy of withdrawal is an economy of disaster".
Former head of state Ernest Shonekan, however, defends the reforms as essential.
"Whatever initial pains they might have brought, we must appreciate the fact that economic reforms take time to work their way through and begin to produce results," he says.
The most serious legacy of the Obasanjo presidency is to be found in the deteriorating security situation in the Niger Delta - Nigeria's economic powerhouse.
The region's oil and gas riches provide about 90% of the country's foreign earnings. But militant youths, actively supported by the indigenes, are turning the entire mangrove creeks into a vast minefield.
The armed protests in the region are fast turning into an insurgency. In February, the Movement for the Emancipation of the Niger Delta (Mend), an umbrella body of the major militant groups, issued a public statement threatening war.
"We will fight a war that has never been fought in Africa and disintegrate Nigeria if we have to do so to get justice," it said. It accused the government of engaging in "a show of absolute disrespect of Ijaw potency and a test of the might of the nuisance value that we can deploy".
That "nuisance value" is exacting an increasingly heavy toll on Nigeria's oil industry and on the economy.
In the past year, no less than 60 foreign oil workers have been kidnapped.
Initially all the kidnappings were carried out on oil installations, but recently foreigners were kidnapped in the centre of the city of Port Harcourt in Rivers State. The government says it lost more than $4bn last year as a result of the insecurity and vandalism of pipelines.
Giving details of the 2007 federal budget in January, Finance Minister Nenadi Usman said that Nigeria realised only a marginal increase in oil revenue last year, compared to receipts in 2005 - despite the all-time record price of crude oil in 2006.
The recent shortage of petrol in Nigeria is partly attributed to the sabotage of an important installation through which oil is supplied to the country's two major refineries in Warri and Kaduna. The militants have prevented contractors from repairing the facility.
President Obasanjo's response to the deteriorating security situation is the establishment of a military Joint Task Force (JTF), which is carrying out Operation Restore Hope in the region.
The JTF itself has suffered heavy casualties at the hands of the militants.
This legacy of an unstable and highly militarised region is one which President Obasanjo's successor must confront - and early too - for the economic and political stability of Nigeria.