Nigerian President Goodluck Jonathan's party has finished second in a state election seen as a test of his popularity and opposition strength, the country's electoral watchdog said on Sunday.
The Independent National Electoral Commission (INEC) said on its website that Jonathan's Peoples Democratic Party (PDP) received 97,700 votes in the race for a new governor in southeastern Anambra state, while the main opposition All Progressives Congress (APC) was just behind with 95,963 votes.
Victory went to the All Progressive Grand Alliance which retained the governorship with 180,178 votes, INEC said of the election that concluded on Saturday.
Voting in Anambra was being watched to determine the extent of public support for Jonathan before his expected run for re-election in 2015.
He has not yet declared his candidacy but some within his party believe that he should uphold an unwritten rule that the presidency rotates between a candidate from the majority Muslim north and the predominantly Christian south.
Jonathan is a southern Christian from Bayelsa state.
Five state governors who had previously formed a splinter group in opposition to Jonathan's expected bid for re-election last week announced that they had joined the APC.
The APC is looking to secure its first presidential victory since Nigeria returned to civilian rule in 1999.
Polling in Anambra first took place on November 16 but the PDP, APC and Labour Party all called for the election to be declared null and void, amid reports that ballot boxes, papers and other election material went missing.
Police also imposed tough restrictions on movement into and out of the state, which was viewed in some quarters as harassment and intimidation and raised fears for the running of the general election in 18 months' time.
INEC, which admitted there were some "lapses" in organisation, ordered a partial re-run in a number of constituencies on Saturday.
Turnout for the whole exercise was low at just 26.3 percent.