Nearly 60 million people 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, 57, a 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 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.
Polling will continue Sunday in some areas where new machines largely failed to read voters' biometric cards, said Kayode Idowu, spokesman of the Independent National Electoral Commission. 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.
Before dawn, Boko Haram extremists invaded the town of Miringa in Borno state, torching people's homes and shooting them as they tried to escape the smoke. Twenty-five people died in the attack, state Gov. Kashim Shettima told a news conference in the city of Maiduguri.
Nigeria's home-grown Islamic extremists say democracy is a corrupt Western concept and point to the endemic corruption as a reason to do away with it in favor of an Islamic caliphate.
Another 14 people were killed in extremist attacks on the town of Biri and Dukku in Gombe state, according to police and local chief Garkuwan Dukku.
Among the dead was a Gombe state legislator, Umaru Ali, said Sani Dugge, the local campaign director for the opposition coalition.
Two voters were killed in Boko Haram attacks on polling stations in the Gombe towns of Birin Bolawa and Birin Fulani, according to police. Witnesses said the gunmen yelled that they had warned people to stay away from polling.
The population of 170 million is almost evenly divided between Christians and Muslims.