By Heidi Vogt in Abuja and Patrick McGroarty in Yola, Nigeria 

ABUJA, Nigeria--Election officials allowed polling stations to extend voting into Sunday after some polling stations encountered problems Saturday with electronic biometric readers used to verify voter identity.

It was a rough start to an election with so much at stake: Nigeria needs to show it can make it through this vote fairly and peacefully in order keep its gigantic economy humming and press forward with tackling the Boko Haram Islamist militants. And now, the technology that was supposed to make the election easier is threatening the process.

"There were places where there were challenges," said Kayode Idowu, a spokesman for Nigeria's election commission. He said the card readers had problems that caused delays, in some cases because workers didn't remove a protective clear sticker, in others possibly because the sim cards weren't properly activated. So some polling stations suspended voting altogether, while in others the voters just started leaving out of frustration. This is the first time Nigeria has used the electronic verification system.

"For those areas there's nothing one can do, other than say, well, so be it, come back tomorrow," Mr. Idowu said. He said he didn't have an estimate of how many polling stations would have to reopen Sunday.

Boko Haram militants had also vowed to disrupt the vote and they killed three police officers and four voters in an attack on a number of polling stations in the northeastern state of Gombe, residents said. Mr. Idowu said he had not received reports of any other violence.

Those polling stations that were able to vote closed at 5 p.m. and tallying began.

President Goodluck Jonathan--in power since 2010--is running against Muhammadu Buhari, a four-time candidate with wide support among Muslims in the north of the country. Mr. Jonathan's support base is the predominantly Christian south. Polls have shown the two in a tight race.

When Mr. Jonathan beat Mr. Buhari in 2011, riots broke out across northern Nigeria, where Muslims and Christians mingle in cities such as Kaduna and Kano. Human Rights Watch says more than 800 were killed.

But the two men have pledged to make things different this time. Mr. Jonathan and Mr. Buhari embraced each other in the capital on Thursday and signed a peace pact that committed both to encouraging a free, fair and orderly vote.

Technical snafus bedeviled early voting registration. Many of the hand-held scanners had trouble reading the biometric data on voter's cards or registering their fingerprints, causing delays. Local media reported that even President Jonathan was having trouble--three card readers failed to identify Mr. Jonathan as he tried to register in his hometown of Otuoke.

Monitors said similar reports were coming in from across the country.

"It's certainly something we see not just in a few places. It's not limited to one, two or three polling stations," said Eberhard Laue, a spokesman for the European Union monitoring team.

The government went to extraordinary lengths to assure Nigerians that they would be safe on Saturday, closing land and sea borders for days and barring even most road traffic. Officials said a polling station was within walking distance for most of the 50 million voters.

The election has also been complicated by the threat of Boko Haram militants. It was delayed for six weeks to give the military more time to beat back the insurgents, who vowed to disrupt the vote.

In Gombe on Saturday, the militants opened fire as they drove into village polling stations in Nafada and Dukku administrative areas, according to residents who escaped.

"We saw the dead bodies of three policemen and a voter on the ground," said Ibrahim Hussaini, who lives in Biri Bolawa village. A resident of another nearby village--a man named Saleh Musa--said the attackers then came to his polling station and shot three voters dead.

Nigerian police spokesman Emmanuel Ojukwu confirmed that there was an attack, but said he didn't have details.

The military has retaken a large amount of the northeast from the militants, but hundreds of thousands are displaced and it is unclear how many will actually go out to the polls in the battered region.

Voters turned out to vote in large numbers in Maiduguri, the capital city of Borno state, which has been at the center of the war against Boko Haram. But in another northeast state, Adamawa, turnout was more sparse.

Officials set up polling stations for two of the state's 21 districts in the state capital of Yola because the areas remain deeply unsafe. At many polling stations for voters from those districts, less than 20% of registered voters had managed to make it to the voting booth, tallies there showed.

"We are blaming our incumbent government," said Habu Umaru, one of about 80 people out of 650 eligible voters in his district who made it to the polls. "Our people have been under attack and now you want them to travel here to exercise their civil liberty. They don't have the means."

A year ago, Nigeria passed South Africa as the biggest economy in Africa. Since then oil prices have plunged to half their former value. The price drop has drained revenue from Africa's top crude producer, hammered Nigeria's currency and dimmed its growth outlook.

Mr. Jonathan, a 57-year-old former zoology professor, says he will raise new revenue from a luxury tax and cut spending. Mr. Buhari, 72, who briefly ruled Nigeria as a military dictator in the 1980s, has vowed to tackle corruption.

The tenor of the vote varied widely by location. In the capital city of Abuja, residents openly discussed voting for rival candidates. Building contractor Tony Julius said he had decided to vote for Mr. Buhari but his wife was sticking with Mr. Jonathan, who they both supported in 2011. Mr. Julius said he was tired of constant power cuts and he didn't think Mr. Jonathan had done enough to improve security in the north. Blessing Julius, his wife, said she wanted to give Jonathan more time.

In Gombi, a town near Nigeria's northeastern border with Cameroon that Boko Haram attacked in November and January, many said they were voting for Mr. Buhari. Thousands of people waited in a grade school courtyard to cast their ballots.

Bahiru Bamanga waited two hours to have his identity verified. At the front of a long line under a wizened baobab tree, an election official scanned his voting card and his left thumb.

"I need peace. I don't want to suffer always," said the 22-year-old welder. In the town, blackened steeples of three destroyed churches loom over a row of shops destroyed during Boko Haram's November assault.

Write to Heidi Vogt at heidi.vogt@wsj.com and Patrick McGroarty at patrick.mcgroarty@wsj.com