Abubakar's Peoples Democratic Party cried foul, claiming Buhari's All Progressives Congress colluded with the electoral commission
Nigeria's President Muhammadu Buhari on Wednesday said his re-election was "free and fair", after his beaten rival denounced the results as a "sham" and promised a legal challenge that could dominate politics for weeks.
The 76-year-old one-time military ruler's victory was confirmed late on Tuesday, after rescheduled polling blamed on logistical difficulties.
Buhari's winning margin over his nearest challenger, Atiku Abubakar, was 3.9 million votes -- more than enough to ensure he remained head of Africa's most populous nation and leading oil producer for the next four years.
Leading civil society election monitors YIAGA Africa, which has US and British backing, said "the announced election results reflect the votes cast", even if there were problems.
But Abubakar's Peoples Democratic Party (PDP) cried foul, claiming Buhari's All Progressives Congress (APC) colluded with the electoral commission to manipulate the outcome.
The former vice-president broke his silence nearly 10 hours after results were announced to explain he would have congratulated Buhari, had the vote been "free and fair".
Instead, he said: "I hereby reject the result of the February 23, 2019 sham election and will be challenging it in court."
Buhari called Saturday's vote "another milestone in Nigeria's democratic development", 20 years after the country returned to civilian rule.
Thanking his opponents for a "hard-fought campaign", he said: "From the comment of several observers, both local and foreign, it is obvious that the elections were both free and fair."
Buhari's supporters began celebrating at his campaign headquarters in Abuja late on Tuesday, as he took an unassailable lead.
But there were none of the spontaneous street parties that marked his victory in 2015, when he became Nigeria's first opposition candidate to beat an incumbent president.
Even in Kano, the biggest city in Buhari's northern homeland, celebrations were muted. Many blamed the fact that results were only confirmed at 4:00 am.
Later on Wednesday morning, APC supporters took to the streets, dancing to music played on loudspeakers and waving wicker brooms -- the party symbol.
Many shouted his campaign slogan "Sai Baba!" (Only Buhari) and "four more years!" Crowds were noticeably smaller than in 2015, an AFP correspondent in the city said.
Armed police had to break up skirmishes between APC and PDP supporters, he added.
In the southern city of Port Harcourt -- a PDP stronghold -- a group of angry pro-Biafran supporters took to the streets to denounce the results as a "charade".
"We don't want Buhari. His re-election was a grand manipulation... We want freedom," said car mechanic Joseph Elijah, calling for an independent republic for the Igbo people in the southeast.
In the commercial capital, Lagos, Ade Monday, 63, said Buhari was hailed as "the Messiah" four years ago and expected to tackle insecurity, corruption and boost the economy.
"But now look, the Messiah has failed us," he told AFP.
The vote was marred by violence, including 53 deaths, according to election observers.
Some reported vote-buying, intimidation and violence towards voters and officials, which have been a problem in previous polls in Nigeria.
At 35 percent across the country, low voter turnout was blamed on a combination of apathy because of the one-week delay, organisational problems and unrest.
Abubakar's promise of legal action now raises the prospect of a lengthy court battle, which will dominate the run-up to Buhari's official inauguration on May 29.
The PDP's main claim is that data from handheld devices used to authenticate voter identities at nearly 120,000 polling units had been altered in favour of the ruling party.
It called for the data from the machines to be made available to all parties for checking and the election to be re-run in at least two states.
Tens of thousands of "valid, legal" votes had been cancelled elsewhere, it added.
PDP spokesman Boladele Adekoya said evidence for the legal challenge was being compiled for submission to the presidential election tribunal, set up by the Supreme Court.
Buhari sparked controversy weeks before the election by suspending the head of the Supreme Court, Chief Justice Walter Onnoghen, after he was charged with corruption.
Critics spied a political motive, as Onnoghen could have ruled on any dispute.
The election tribunal will be overseen by the acting chief justice, Ibrahim Muhammad Tanko. It will adjudicate on complaints about the result and has the power to overturn it.
"We wait to see how independent and truthful the acting CJN panel is," said the PDP's Adekoya.