ABUJA (Reuters) - Gunmen killed at least 15 people including an opposition politician near polling stations in northeast Nigeria on Saturday, casting an ominous shadow over the closest electoral contest since the end of military rule in 1999.
The poll is seen as the first election in which an opposition candidate has a serious chance of unseating the incumbent, President Goodluck Jonathan, but widespread fears it could trigger violence are already becoming reality.
The tense race pits Jonathan against former military ruler Muhammadu Buhari with an electorate divided along a complex mix of ethnic, regional and in some cases religious lines.
Twelve other minor candidates are also running.
Polls were meant to open for accreditation at 120,000 ballot stations at 8 a.m. (0700 GMT), with actual voting starting at 1.30 p.m. and continuing until the last person has voted. With 56.7 million eligible voters, it could drag well into Sunday.
Islamist Boko Haram insurgents launched several attacks on voters in the northeast, killing three voters in Yobe state and three more in Gombe state, police said. [ID:L6N0WU0H6]
At least eight people, including the opposition house of assembly candidate for Dukku in Gombe, were also killed by unidentified gunmen, a spokesman for Buhari's All Progressives Congress (APC) said.
Boko Haram militants, who are trying to revive a medieval Islamic caliphate in religiously-mixed Nigeria, reject democracy. Leader Abubakar Shekau has threatened to kill Nigerians who go to vote.
A string of victories against the militants by Nigeria and neighbours Chad, Cameroon and Niger has reclaimed much of the territory the Islamists controlled earlier this year, but they retain the ability to mount deadly attacks on civilians.
Separately, gunmen shot dead a soldier in an ambush in the southern oil hub of Port Harcourt, a hotbed of Jonathan support but a city with a long history of political thuggery.
The vote was beset with technical problems as scanners failed to recognise some cards and fingerprints across the country, including that of Jonathan, who waited more than 40 minutes as officials tried to get four machines to work.
"I'm very hopeful," he said of his chances after voting.
Biometric card readers were introduced to prevent the rampant ballot box stuffing and multiple voting of past polls.
A credible and relatively calm poll would be a new chapter in the history of Africa's most populous nation, biggest economy and top oil producer, whose five decades of independence have been tarnished by military coups and secessionist movements.
Voters queued for hours just to get accredited to vote.
"They are extraordinarily patient," U.S. Assistant Secretary of State for African Affairs Linda Thomas-Greenfield told Reuters TV at a polling station in central Abuja. "We have to commend the Nigerian people for being so patient."
The vote is seen as a referendum on the record of Jonathan, a former zoology professor whose time in office has been blighted by massive corruption scandals and the Boko Haram insurgency in which thousands have died.
"These elections are a defining moment for Nigeria. ... People have a real choice," former Malawian President Bakili Muluzi, who is leading a Commonwealth observer mission, said.
"The danger is post-election. We've been assured by the peace accord between the leaders but how that trickles down is the danger," he told Reuters, referring to a second pact signed between Jonathan and Buhari on Friday not to whip up violence.
Yet the poisonous rhetoric emanating from both sides during the campaign, as well as some scuffles and shootings, have raised doubts over whether such agreements will be respected.
When Buhari, a northern Muslim, lost to Jonathan, a southern Christian, in 2011, it triggered rioting in the mostly Muslim north that killed 800 people and destroying the homes of 65,000.
Before voting started, two bombs exploded at polling stations in the east, causing no deaths, while police destroyed a third. Hackers also shut the electoral commission website.
On Friday Jonathan told anyone planning violence to think again, yet many Nigerians queued up en masse on Friday to withdraw cash, buy fuel supplies and stock up at supermarkets.
In a climate of mutual suspicion, Buhari's All Progressives Congress also warned against any "devilish moves."
Buhari's top selling point is a belief he never stole during his 1983-85 rule, a rare feat for a top Nigerian politician.
His reputation as a military leader also plays well with voters critical of the government's failure to quell Boko Haram. Buhari's authoritarian rule, in which opponents were jailed and drug dealers executed, is not fondly remembered by all.
And as always in the nation of 170 million people, ethnic and regional sentiments remain paramount. Buhari is hugely popular in the north, Jonathan, in the south and east.
That could leave the southwest as the kingmakers. The region, which centres around the commercial capital Lagos, is mostly ethnic Yoruba but religiously mixed. They voted for Jonathan last time but since then Yoruba elite have rallied decisively around Buhari.
(Additional reporting by Angela Azumadu in Abuja, Julia Payne in Port Harcourt and Alexis Akwagiram in Kaduna, Felix Onuah in Abuja, Nnekule Ikemfuna in Kano, Chijioke Ohuocha and Oludare Mayowa in Lagos; Editing by Ed Cropley and Raissa Kasolowsky)