ABUJA, Nigeria — Voting in Nigeria's elections continued in certain areas on Sunday after technical problems prevented some people from casting their ballots on Saturday.
Many Christian Nigerians attended Palm Sunday church services in which they prayed for a peaceful outcome for the elections.
More than 40 people were killed in election-related violence Saturday, though millions were able to vote in a presidential election that analysts say is too close to call.
Voting was extended in about 300 of the country's 150,000 polling stations, including some areas of Lagos, Nigeria's megacity of 20 million on the Atlantic coast, according to the country's electoral commission. The extended voting was necessary because new voting equipment failed to confirm voters' identities.
Boko Haram extremists killed 41 people, including a legislator, and scared hundreds of people from polling stations in the northeastern Nigeria. In electoral violence elsewhere, three people including a soldier were shot and killed in southern Rivers state and police said two car bombs exploded at polling stations in the southeast but no one was injured.
Nearly 60 million Nigerians have cards to vote and for the first time there is a possibility that a challenger can defeat a sitting president in the high-stakes contest to govern Africa's richest and most populous nation.
The front-runners among 14 candidates are President Goodluck Jonathan, a 57-year-old Christian from the south, and former military dictator Muhammadu Buhari, 72, from the predominantly Muslim north.
Voters also are electing 360 legislators to the House of Assembly, where the opposition currently has a slight edge over Jonathan's party. Voting for 13 constituencies was postponed until April because of shortages of ballot papers, electoral officials said.
Nigeria's political landscape was transformed two years ago when the main opposition parties formed a coalition and for the first time united behind one candidate, Buhari. Dozens of legislators defected from Jonathan's party.
Even the president was affected by the technical hitches on Saturday. Three newly imported card readers failed to recognize the fingerprints of Jonathan and his wife. Biometric cards and readers are being used for the first time to discourage the kind of fraud that has marred previous votes.
Afterward, Jonathan wiped sweat from his brow and urged people to be patient as he had been, telling Channels TV: "I appeal to all Nigerians to be patient no matter the pains it takes as long as if, as a nation, we can conduct free and fair elections that the whole world will accept."
Most Nigerians exercised extraordinary restraint, waiting hours in heat that rose to 100 degrees (37 degrees Celsius) in some places. Many remained for more hours after voting ended to witness the ballot count, determined to do their part to try to keep the elections honest.
"The high voter turnout and the dedication and patience of Nigerian voters is, in itself, a triumph of Nigerian democracy," said the national counter-insurgency spokesman, Mike Omeri. He praised the bravery and commitment of military and security agencies that he said made the elections possible.
Struggling with power blackouts that are routine, some officials counted ballots by the light of vehicles and cellphones.
A major campaign issue has been Boko Haram's Islamic insurgency. The failure of Jonathan's administration to curb the rebellion, which killed about 10,000 people last year, has angered many Nigerians.
International outrage has grown over another failure — the government's inability to rescue 219 schoolgirls kidnapped by Boko Haram nearly a year ago. The extremists have abducted hundreds more people since then, using them as sex slaves and fighters.
The Islamic uprising has exacerbated relations between Christians like Jonathan, who dominate the oil-rich south, and Muslims like Buhari, who are the majority in the agricultural and cattle-herding lands of the north. Nigeria's population of 170 million is almost evenly divided between Christians and Muslims.
Some 1,000 people were killed in rioting after Buhari lost to Jonathan in the 2011 elections. Thousands of Nigerians and foreign workers have left the country amid fears of post-election violence.
In 2011, there was no doubt that Jonathan had swept the polls by millions of votes. Now the race is much closer. Results are expected 48 hours after voting ends. If no clear winner emerges, a runoff will be held.
Umar reported from Maiduguri. Associated Press writers Jerome Delay in Kaduna, Shehu Saulawa in Bauchi, Adamu Adamu in Potiskum, Lekan Oyekanmi in Yola, Hilary Uguru in Port Harcourt, and Ben Curtis in Daura, also contributed to this report.