ABUJA, Nigeria — President Goodluck Jonathan conceded Tuesday to a former military general in a close and tense election that was ultimately decided over voter fury at corruption and at Boko Haram militants who have killed thousands of civilians.

Jonathan, 57, congratulated former Army general Muhammadu Buhari, 72, in a phone call, Aviation Minister Osita Chidoka told the Associated Press. Chidoka is close to Jonathan, who has governed Nigeria the past five years.

Goodluck’s defeat is the first time an incumbent president has been voted out of office in Africa’s most populous nation and represents its first civilian transfer of power.

“The situation in our country calls for change, a positive change that could save the country from total collapse,” said Musa Abubaker, a shopping mall security guard.

Buhari, who served as Nigeria’s president after a military coup in the early 1980s, led by 2 million votes when tallies from all but one state were counted from Saturday’s vote. Buhari was likely to carry the sole remaining state, northeast Borno, which is the birthplace of Boko Haram and has 1.4 million eligible voters.

Jonathan’s popularity plunged as Buhari accused the president of mismanaging Nigeria’s oil-dependent economy and failing to defeat Boko Haram insurgents operating in the country’s northeast.

Boko Haram killed 10,000 people last year and forced about 1.5 million to flee for southern Nigeria and neighboring countries. The extremists have kidnapped hundreds of people, including 219 schoolgirls last year who have yet to be found. The radical Muslims often force abductees to convert to Islam and fight or work as sex slaves.

Saturday, Boko Haram fighters killed 41 people, including a lawmaker, and scared hundreds away from voting stations in attacks in northeastern Nigeria.

Jonathan, a Christian who hails from southern Nigeria, enjoyed strong support in the Christian, oil-producing regions along the country’s coast. Buhari is a Muslim from the mostly Islamic and agricultural northern parts of the country.

The president did make recent gains against Boko Haram. Forming a military alliance with Cameroon and Chad, the Nigerian military under Jonathan has reclaimed territory once controlled by the militants. Friday, the day before voters went to the polls, the Nigerian army announced the takeover of the group’s headquarters in Gwoza near the Cameroonian border.

Some voters said Jonathan needed more time to set the country on track.

“He has been a good leader and has been transforming the country positively,” said Patience Wayo, an office custodian in Abuja.

Voting was extended a day because of voting machine malfunctions and other problems. In some areas, voting was postponed to April for legislative offices because of a lack of paper ballots. Many Nigerians have complained of not receiving voting cards because they’ve been displaced by Boko Haram fighting.

In 2011, Jonathan ran for president and defeated Buhari by a wide margin.

Suleiman Ismaila Nchi, director of the Center for Policy Analysis at the University of Jos, said Buhari was a stronger candidate in this campaign because he united Nigeria’s opposition parties into a new coalition, the All Progressives Congress, and successfully enticed members of Jonathan’s People’s Democratic Party to endorse his candidacy.

“Buhari has emerged on a larger national platform than in previous elections when he was limited to the northern geopolitical zones,” Nchi said.

After the election four years ago, Buhari’s largely Muslim supporters attacked Christians in the north. Christians in other regions then targeted Muslims. About 1,000 people died. Thousands of foreign workers have left the country amid fears of post-election violence.