Nigeria's Supreme Court has rejected both opposition challenges to President Bola Tinubu's election victory.
The two main opposition candidates had sought to overturn the results of the February presidential election, citing irregularities.
Last month, the Election Petition Court upheld Mr. Tinubu's win, but the opposition insisted the nation's highest court should overturn the ruling.
In Nigeria, presidential election results have never been overturned.
A unanimous decision by a panel of seven justices first dismissed the appeal from Atiku Abubakar, the runner-up in the election, and then rejected a similar appeal from Peter Obi, who came in third.
Justice John Inyang Okoro stated, "I find no merit in this appeal and hereby dismiss it," regarding Mr. Abubakar's Peoples Democratic Party's case.
This election was the most hotly contested since the end of military rule in 1999, featuring three strong candidates for the first time. Mr. Tinubu secured the win with 37% of the total votes, compared to 29% for Mr. Abubakar and 25% for Mr. Obi.
With the legal challenge to his victory now put to rest, President Tinubu is expected to concentrate on addressing the nation's ongoing economic crisis.
Nigeria is currently grappling with a cost-of-living crisis caused by the removal of a substantial fuel subsidy, which has driven many Nigerians into a state of multi-dimensional poverty.