Ruling party candidate Bola Tinubu has been declared the winner of Nigeria’s disputed presidential election.
The 70-year-old veteran politician got 37% of the vote, official results show.
His main rival Atiku Abubakar polled 29%, and Labour’s Peter Obi 25%.
Their parties had earlier dismissed the poll as a sham, and demanded a rerun.
Mr Tinubu urged them to accept the result, but Labour said it was taking legal action to annul his victory.
Mr Tinubu is one of Nigeria’s richest politicians, and based his campaign on his record of rebuilding the biggest city, Lagos, when he was governor.
He was nevertheless defeated in the city by Mr Obi, a relative newcomer who mobilised the support of many young people, especially in urban areas, shaking up the country’s two-party system.
Mr Tinubu won most other states in his home region of the south-west, where he is known as a “political godfather” – for helping to put others into office.
He campaigned for the presidency under the slogan: “Emi lo kan”, which means “It’s my turn” in Yoruba.
Scenes of celebration have been reported in Mr Tinubu’s strongholds in the south-western states.
Traditional drummers lined the streets, beating their drums for excited dancers in Osun, while supporters marched to a live band in Ekiti.
Some partied into the early hours in Lagos, even though he was defeated by Mr Obi in the city.
The normally bustling streets of Lagos are relatively quiet on Wednesday, the usual rush-hour traffic has not been seen and some shops, businesses and banks have not opened.
Life has returned to normal in places that did not support Mr Tinubu, like the capital, Abuja, and Kano in the north.
In north-eastern Adamawa state, home to Mr Abubakar, there is an air of disappointment in the main city Yola, but grudging acceptance that after several attempts for the presidency, it is time for the former vice-president to move on.
Mr Obi’s stronghold in south-eastern Anambra state, where he once served as governor, is quiet but there is an underlying sense of bitter anger. Many feel frustrated at what they see as a fraudulent electoral process.
In his acceptance speech, Mr Tinubu called for reconciliation.
“I take this opportunity to appeal to my fellow contestants to let us team up together. It is the only nation we have. It is one country and we must build it together,” he said in a televised speech.
He added that they had the right to challenge the results in court but said that the lapses in the election “were relatively few in number and were immaterial to affect the outcome of this election”.
At a news conference later, Mr Obi’s running-mate Yusuf Datti Baba-Ahmed urged his supporters to stay calm.
Labour’s lawyers were “putting the papers together” to challenge Mr Tinubu’s victory in court, he added.
According to official results, voter turnout was 27%, one of the lowest since the end of military rule in 1999.
With about 8.8 million votes cast for Mr Tinubu, he was the choice of less than 10% of the record 93 million Nigerians who registered to vote, helped by a divided opposition.
A newly introduced electronic voting system seems to have eliminated the ballot-stuffing that happened in the past and helped present a more accurate picture of the voting population.
But given that 87 million people actually collected their voter cards before election day – which was not an easy process and involved queuing for hours – it is more likely that problems on voting day, rather than voter apathy, was responsible for the low number of ballots cast.
Many potential voters left polling stations without casting their ballots after voting did not start on time in many places.
In some opposition strongholds, voting did not take place at all and there were also cases of ballot-box snatching and voter intimidation in southern states such as Rivers, Lagos and Delta.
President Muhammadu Buhari is stepping down after two terms in office, marked by economic stagnation and growing insecurity around the country – from an Islamist insurgency in the north-east to a nationwide crisis of kidnapping for ransom and separatist attacks in the south-east.
Mr Tinubu now has the task of solving these problems, among others, in Africa’s most populous nation and biggest oil exporter.
After fighting military rule in Nigeria, escaping into exile and being one of the founding members of the country’s democracy in 1999, Mr Tinubu will feel that he was destined to become president.
He was always the favourite to replace Mr Buhari – whom he helped become president – and the hurdles he has surmounted to get here will make this an even sweeter win for him.
He was not expected to win the party primary, yet he won.
Many said his decision to go with another Muslim as a running mate would prove an obstacle, but it was not.
Previously all major parties have split their presidential tickets with a Christian from the south and a northern Muslim in order to achieve broad support across this vast nation of 210 million people.
He will now have to prove that he can hit the ground running and that he is still the same formidable force who built modern Lagos, Nigeria’s commercial hub.
Mr Tinubu, known as “Jagaban” by supporters, will now be looking at unifying a country that is retreating into regional lines and religious blocs, as the election results show.
While he met the 25% requirement in two-thirds of Nigeria’s 36 states to show he was nationally accepted, the nature of the win indicates the absence of a truly national party.
Mr Obi won in Christian-dominated states and former strongholds of the main opposition Peoples Democratic Party in the south, while the PDP support shrank back into its northern heartlands.