You probably saw the headline — a successful transfer of power in Nigeria. For the first time since its independence, Africa's most populous and economically powerful country voted an incumbent president out of office, defying all expectations. At a time when democratic good news is hard to come by, what went right in Nigeria? A majority of Nigerians got sufficiently fed up with government venality and fecklessness to do what it took to make their voices heard and force change. The difficulties they surmounted would have daunted most Western voters. Here are some key take-aways from a historic event.

Democratic determination. Despite fears of violence, presumptions of vote-rigging and an election day delayed by six weeks, turnout was unprecedented. Millions of people were up at dawn, waiting for officials to arrive — often hours late — to open the first phase in an infuriatingly convoluted process. After being accredited in the morning, voters had to return in the afternoon to cast their ballots. And they did, especially young people. Many stayed at their polling stations to observe the count and tweeted or emailed pictures of final tally sheets to newspapers.

Sarah Chayes
Sarah Chayes is internationally recognized for her innovative thinking on corruption and its implications. Her work explores how severe corruption can help prompt such crises as terrorism, revolutions and their violent aftermaths, and environmental degradation.
More >

This massive participation seemed to be Nigerians' answer to the possibility of vote-fixing by incumbent President Goodluck Jonathan, as though they were determined to swamp any advantage gained by foul play.

The head of the Independent National Electoral Commission, Attahiru Jega, won praise for resisting blatant political pressure. Though inconvenient, biometric identification cards the INEC insisted on to accredit voters did deter fraud.

Corruption. Even for a country whose name has become synonymous with corrupt practices, Jonathan's administration stood out.

In 2013, a Western official in the capital Abuja remarked, "Jonathan has not been as clever as his predecessors. He and his circle have been taking too much oil money before it gets into the national budget."

"This is just looting," said Ibrahim Hamza, a state employee in the northern city of Kano, "like with bulldozers."

Indeed, in the most spectacular in a string of corruption scandals, the then-governor of the central bank identified a $20-billion shortfall in oil revenue a year ago and was fired. The controversy flared up again during the campaign. Under pressure, the finance minister published snippets of a long-delayed audit and admitted to a shortfall of "only" $1.8 billion, but he refused to release the full report.

The plunging price of oil, Nigeria's main export, exacerbated the larceny. Foreign currency reserves bottomed out, civil servants went unpaid and the national currency had to be devalued.

Tired of being denied the economic prosperity that oil wealth should bring them, a majority of Nigerians were looking for a leader who would make rooting out corruption his main goal. Perhaps even more than the Boko Haram insurgency, this issue galvanized voters.

The virtues of severity. A 72-year old former army officer who ruled the country 30 years ago may seem an odd choice to symbolize change. A legendary ascetic, the newly elected president, Muhammadu Buhari, subjected Nigerians to a "discipline campaign" during his brief dictatorship. It famously included whipping people into line at bus stops and attempting to kidnap a former minister in London to stand trial in Nigeria. But that history didn't deter voters. It may even have attracted them.

Many hope Buhari will crack down on both corrupt officials and the Boko Haram insurgents who have kidnapped and killed their way across the country's northeast. But Nigerians also seem ready for a dose of discipline themselves. They speak ruefully about their own ambiguous behavior in the face of corruption, about how "our old African values have disappeared."

Nationwide appeal. Nigeria is often depicted as split along regional and religious lines, Muslim north against Christian south. But Muslim Buhari's running mate was a Christian pastor from the vibrant southern commercial capital of Lagos. Speaking to the grievances of all, their truly national ticket swept almost the whole country, minus the oil-rich southern tip and an eastern enclave.

International pressure. Unprecedented international focus on this election, especially by English-speaking Nigeria's two key trading partners, Britain and the United States, contributed to its success. President Obama, Secretary of State John Kerry and his British counterpart, Philip Hammond, as well as others, repeatedly condemned potential political violence or efforts at vote-rigging, and later urged Jonathan to concede defeat. He did so quickly and unconditionally, probably warding off the type of bloodshed that marred the past two Nigerian presidential elections.

Now U.S. officials should support Buhari as he takes on the tasks of weeding out corrupt officials, reforming political practices, diversifying economic activity, and establishing an army whose conduct Nigerians can be proud of. Taken together, those changes represent the best strategy for defeating the Boko Haram insurgency and offering Nigerians the prospect of a decent life.

This article was originally published in the Los Angeles Times.