LAGOS: Measured one way, Nigeria's democracy took a giant step backward last month. Its state and national elections displayed a disastrous mix of fraud and bungling, even worse, by most accounts, than the seriously marred elections in 1999 and 2003.
Observers from the European Union said the elections were not credible; Nigerian observers demanded that they be canceled and held again.
The president-elect, Umaru Yar'Adua, faces an immediate "crisis of legitimacy," according to the Senate president, Ken Nnamani, a member of Yar'Adua's party. It is a feeling shared by many Nigerians who worry that the country is teetering on the brink of catastrophe.
But judged another way, the test of democracy is only beginning: Will Nigeria navigate the legal and political challenges to the election peacefully, in a way that cements rather than undermines its young democracy? There are reasons to expect that Nigeria is better prepared to withstand the weeks ahead than one might think.
As recent successful elections in long-suffering African nations like Liberia and Congo demonstrate, organizing a transparent and credible election is possible, producing moments that the world cheers. But building a functioning democracy is a very different task.
Both Congo and Liberia, for example, are shattered nations with few meaningful institutions. Only time will tell if these nations, broken by war, become true democracies in which the will of the people can be carried out.
Nigeria is much farther along that road. Eight years into civilian government after a long spell of military dominance, Nigeria's institutions are blossoming despite the electoral chaos of recent weeks.
"Elections do not a democracy make," said Chris Fomunyoh, director of Africa programs for the National Democratic Institute for International Affairs, a pro-democracy organization based in Washington. While voting is an essential part of democracy, Fomunyoh said, it is only the first, and in some ways the smallest part.
Last year, the National Assembly resisted an attempt by the supporters of President Olusegun Obasanjo to change the Constitution to allow him to run for a third term. Despite considerable pressure from those in the political elite who felt the country was better off sticking with him, the Senate and House of Representatives rejected the effort.
Many lawmakers had sectarian reasons for refusing, because the unwritten rules of politics here, aimed at keeping the peace in a nation divided ethnically and religiously, dictate that the next president should be a Muslim from the north because Obasanjo is a Christian from the southwest.
Whatever the National Assembly's motives, it forcefully asserted its independence.
Nigeria's courts have shown similar independence. Obasanjo's bitter feud with his vice president, Atiku Abubakar, culminated with Obasanjo's allies using corruption charges from an administrative panel to bar Abubakar from running for president. But a last-minute Supreme Court ruling in his favor returned him to the ballot.
Nigeria's robust array of civic and religious groups, driven underground by military rule, have blossomed into watchdogs, freely criticizing and even condemning the government's handling of the election.
Nigeria's cacophonous news media deployed armies of correspondents across the 36 states to bring back reports of stuffed ballot boxes, intimidated voters and phony results.
And Nigeria's cellphone explosion allowed for text messages between poll watchers, voters and political parties, making instances of rigging and intimidation in far-flung polling places almost impossible to hide.
Madeline Albright, the former U.S. secretary of state, led a team of observers from the National Democratic Institute.
"There are certain elements of the evolution of democracy that are moving forward," she said. "The electoral element is not."
But the others are moving in ways that are unusually robust on a continent struggling for examples of peaceful, multiparty rule, Albright said, and these developments cannot be easily undone in two terrible election days.
It has become apparent that the ruling People's Democratic Party, or PDP, simply seized the apparatus of democracy - ballots, boxes, ink and tally sheets - and rigged its way to victory in a number of places. But the sweeping victories of the ruling party will be challenged, both in the courts of law and the court of public opinion.
Yar'Adua's lopsided victory - he won 72 percent of the vote - is likely to stand because of its size and the difficulty of proving the outcome would have been materially different despite the problems. Short of a rerun, he is likely to become president on May 29, when Obasanjo steps down.
But Yar'Adua will face a hostile public and stiff challenges from the newly empowered institutions meant to check executive power in Nigeria.
"What this election has resulted in ironically is a significant deflation in the PDP's ability to lead," said Stephen Morrison, director of the Africa Program at the Center for International and Strategic Studies in Washington. "They are coming out of this more vulnerable to crisis and less able to govern."
The power of the party in the National Assembly and the states is also likely to be diminished. A number of races for governorships, state assemblies and the National Assembly will be challenged in election tribunals. In a number of places, victories by the ruling party could be overturned.
The real problem is that most Nigerians have lost faith in democracy just as it begins to take root within the mechanisms of state. Last year's Afrobarometer survey showed that satisfaction with democracy in Nigeria had plummeted to 25 percent in 2005 from more than 80 percent in 2000. That mirrored a smaller but still significant drop across the 18 sub-Saharan African countries surveyed, to 45 percent from 58.
This drop was evident among a group of taxi drivers, shoeshine men and hawkers who gathered recently in the shade of a grimy highway overpass here. Asked why they had not taken to the streets to protest the election, most said they had no desire to face the guns of the military or the police.
"I am not ready to die for this country," said Deloa Lawal, a 35-year-old taxi driver with two young children.
Nnaama Idemili, an unemployed accountant, gave another reason, in the form of a Nigerian proverb. It reflected the feeling that allowing the institutions of democracy to do their work would do more good than violent protest, which might prompt the military to intervene and seize power in the name of order.
"A man who breaks a coconut with his head will never eat that coconut with his mouth," he said.
"I want Nigeria to change," Idemili explained. "But we can't destroy the country in the process. Things are moving. We only pray they keep moving in the right direction."