Nigerian President Muhammadu Buhari has been re-elected for a second four-year term, final results from Saturday's general election show.
The 76-year-old defeated his main rival, former Vice President Atiku Abubakar, with a margin of just under four million votes.
Mr Abubakar's People's Democratic Party (PDP) has rejected the result.
Delays and violence marred the run-up to the poll but no independent observer has cited electoral fraud.
Mr Buhari's All Progressives Congress (APC) won in 19 of the 36 states while the PDP was victorious in 17 states and in the capital, Abuja, according to the electoral commission (Inec).
Turnout was just below 35% of registered voters. The commission will make a formal declaration on Wednesday.
Some supporters of Mr Buhari took to the streets late on Tuesday in celebration.
Who is Buhari?
A former soldier, Mr Buhari led a military regime for 20 months in the 1980s and was first elected president in 2015, becoming the first opposition candidate to defeat an incumbent and win the presidency.
His record in office is mixed. Mr Buhari's critics say that the very attributes that won over voters four years ago - his strictness and inflexibility - have emerged as liabilities. They accuse him of autocratic leanings as well as a disastrous tendency towards inaction.
Mr Buhari's supporters can argue that he has largely delivered on campaign pledges such as tackling corruption and cracking down on Boko Haram. But they may struggle to point to concrete achievements in other fields, such as fixing the economy.
Lowest turnout in 20 years
By Tomi Oladipo, BBC News, Abuja
The announcing of Nigeria's election result dragged on through its second day as the paperwork came in from around the country. But as Tuesday night wore on, the outcome became more apparent, with President Buhari securing 15 million votes.
Initial results indicated high voter turnouts in the north, from where Mr Buhari has received the bulk of his votes. But the national turnout figures look to have been the lowest since the country's return to democracy 20 years ago.
The opposition PDP alleges some figures were incorrect but the ruling APC dismissed these claims.
Nigeria's electoral commission will review any alleged discrepancies before announcing the final results and declaring the winner.
What are the main issues?
Africa's most populous nation and largest economy faces a range of problems including power shortages, corruption, security threats, and an economic slowdown.
Nigeria is Africa's leading oil producer but corruption and a failure to invest the proceeds from the industry have hampered development.
A slow recovery from a recession in 2016 means there are not enough jobs for the large number of young people joining the employment market. About a quarter of the working age population is unemployed.
Election in numbers
73 million have voters' cards51% of the electorate under the age of 3573 registered presidential candidates120,000 polling stations
What is the opposition saying?
Earlier on Tuesday, PDP chair Uche Secondus called the count "incorrect and unacceptable". The party said counting should be stopped, alleging data from voter card readers had been manipulated.
The federal government accused the PDP of trying to "scuttle the polls" and prompt a constitutional crisis.
Some 130 people have been taken into custody suspected of electoral offences, reports say.
The initial vote was postponed early on 16 February, five hours before polls were due to open. Voters were also choosing members of the House of Representatives and Senate.