The ousting of an incumbent president at the ballot box in Africa’s most populous country marks a hopeful step for democracy across the continent

ECSTATIC crowds engulfed Kano’s streets as it became clear that Muhammadu Buhari, a former military strongman who ruled Nigeria in the 1980s, had led an opposition party to victory in a presidential contest for the first time in the country’s history. Passengers piled on top of lorries waved the national flag as drivers honked their horns in northern Nigeria’s biggest city. Jubilant drumbeating revellers shouted the name of the man back in the seat of power after an absence of three decades.

“We will celebrate for seven days,” said Aliyu Haruna Aliyu, a farmer outside the headquarters of Mr Buhari’s All Progressives Congress. “We have won the most free and fair election ever to take place in Nigeria. This is a new Nigeria.”

It is indeed a watershed for Africa’s biggest democracy and most populous country, 170m-strong. The defeated president, Goodluck Jonathan, graciously conceded defeat, acknowledging that the rule of his People’s Democratic Party, unbroken since the generals gave way to a civilian government in 1999, had ended.

Mr Buhari, a northern Muslim who led a coup in 1983, had fought the three previous elections in vain. This time he won all the northern states but also made inroads in the south and centre, easily meeting the electoral requirement that the winner must get at least a quarter of the votes in two-thirds of the 36 states to show support across the tribal and sectarian spectrum.

The party has a lot to prove. It has proclaimed itself the harbinger of change, winning over voters disgusted by their government’s dishonesty and its failure to end an Islamist insurgency in the north-east that has cost at least 15,000 lives.

Despite the brutally repressive regime headed by Mr Buhari in the 1980s, people are putting enormous faith in him. His fierce denunciation of corruption and his frugal lifestyle appeal to the poor, who make up the majority of Nigerians. Many of them think it will take a former general to root out the corruption rampant in the upper echelons of the army and to defeat the jihadists. “We will end Boko Haram,” his party’s posters promised. But Mr Buhari will be hamstrung from the start by an economy that relies massively on oil for government revenue and foreign exchange. The federal coffers have emptied as the price of oil has tumbled. Mr Buhari says he will make up the difference by cutting waste and corruption. Yet some of his most senior party men are crooks. Moreover, as a Muslim from the north, Mr Buhari may find it hard to contain violence in the Niger delta, in the south. Fighters in that oil-producing region laid down their arms in 2009 and have since grown fat on amnesty payments and dodgy security contracts. Some of them promised to return to war if Mr Buhari’s lot, who are expected to do away with the expensive peace pact, won. Mr Jonathan, a Christian from the delta, had banked on landslide wins in that region. He did notch up a hefty vote there, but people failed to turn out for him in the same dedicated masses as Mr Buhari’s fans in the north. In Kano, the second most populous state, almost 2m people queued for hours in the baking sun to cast their votes for him, whereas Mr Jonathan’s tally there was paltry. Mr Buhari also won Lagos, Nigeria’s burgeoning commercial capital, whose GDP exceeds that of many west African countries. He swung a lot of voters who had previously backed Mr Jonathan onto his side in the south-west and in the so-called middle belt, defying the conventional wisdom that Nigerians vote almost entirely along ethnic and religious lines.