According to state election officials, the surprise third-party candidate Peter Obi received the most votes in Lagos, the state with the most voters.
The victory is significant because the state was governed by Bola Tinubu, the candidate of the ruling All Progressives Congress (APC), from 1999 to 2007.
Mr. Obi, on the other hand, was widely expected to win Lagos, where many of his young, educated supporters live.

There had been concerns that some election violence and ballot snatching might have harmed his chances of winning. However, those concerns appear to have been unfounded.
Mr. Obi won the state by a razor-thin margin of 10,000 votes.
The total number of voters has not yet been determined, but preliminary figures indicate that turnout was lower than expected.
The head of the electoral commission in Abuja has yet to confirm and officially announce the outcome.

