Nigeria's electoral commission has declared incumbent Muhammadu Buhari the winner of the country's presidential elections.
The announcement in the early hours of Wednesday means the 76-year-old has won a second four-year term at the helm of Africa's largest economy and most populous country.
Hours after Buhari was declared winner, opposition leader Atiku Abubakar rejected the results and vowed a legal challenge.
Buhari, of the ruling All Progressives Congress party, secured 56 percent, or 15.2m votes, in the February 23 polls, Mahmood Yakubu, chairman of the Independent National Electoral Commission (INEC), said.
His main opponent, former vice president Abubakar of the People's Democratic Party (PDP), received 41 percent or 11.3m votes.
"Muhammadu Buhari ... is hereby declared winner," Yakubu said.
Hours after the announcement, Abubakar issued a statement rejecting the results.
"It is clear that there were manifest and premeditated malpractices in many states which negate the results announced..." he said.
"I hereby reject the result of the February 23, 2019, sham election and will be challenging it in court."
The PDP has alleged electoral malpractice, including vote-rigging, in the polls, which were delayed by a week at the 11th hour.
Voting was marked by hours-long delays and deadly violence that observers said kept some people away from the polls.
Buhari's party has said the opposition was trying to discredit the returns from Saturday's election.
The accusations have ratcheted up tensions in a country whose six decades of independence have been marked by long periods of military rule, coups and secessionist wars.
'Marred by violence'
Observers from the Economic Community of West African States, the African Union and the United Nations appealed to all parties to await the official results, expected later this week, before filing complaints.
The candidate with the most votes nationwide is declared the winner as long as they have at least one-quarter of the vote in two-thirds of Nigeria's 36 states and the capital, Abuja. Otherwise, there is a second-round runoff.
Buhari, 76, secured enough votes to meet both requirements.
He took office in 2015 and sought a second term with pledges to fight corruption and overhaul Nigeria's ailing road and rail network.
Atiku, 72, had said he would aim to double the size of the economy to $900bn by 2025, privatise the state oil company, and expand the role of the private sector.
Voting took place after a week-long delay which the election commission said was due to its inability to get ballots and results sheets to all parts of the country.
The vote - Africa's largest democratic exercise - was also marred by violence with at least 47 people killed since Saturday, according to the Situation Room, a monitoring organisation linking various civil society groups.
Some deaths resulted from clashes between groups allied to the leading parties and the police over the theft of ballot boxes and allegations of vote fraud.
Police have not yet provided official casualty figures.
More than 260 people have been killed since the start of the election campaign in October.
The toll so far is lower than in earlier elections, but the worst violence occurred previously only after results were announced.