ABUJA, Nigeria - Boko Haram extremists killed 41 people, including a legislator, and scared hundreds from polling stations in the northeast, but millions voted across Nigeria on Saturday in the most closely contested presidential race in its history.

Three people including a soldier were killed in political thuggery in southern Rivers state, and two car bombs exploded at polling stations in the southeast, but no one was injured, police said.

All the Boko Haram attacks were in the northeast, where the military said Friday it had cleared the Islamic extremists from all major centers, including the headquarters of their so-called caliphate.

Nearly 60 million people have voting cards, and for the first time there was a possibility a challenger could defeat a sitting president in the contest to govern Africa's richest and most populous nation.

The front-runners among 14 candidates were President Goodluck Jonathan, 57, a Christian from the south; and former military dictator Muhammadu Buhari, 72, from the predominantly Muslim north.

Voters will also elect 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, officials said.

Polling will continue Sunday in areas where new machines failed to read voters' cards, an official said.

Even the president was affected. Three card readers failed to recognize the fingerprints of Jonathan and his wife. Biometric cards are being used to discourage fraud.