KANO, Nigeria -- Nigerian President Muhammadu Buhari surged to an early lead in election returns Monday, winning seven of 36 states in Africa's largest democracy, while the main opposition rejected the count, alleging manipulation.

Election observers said the last-minute postponement of the vote until Saturday discouraged some Nigerians from going to the polls as Buhari seeks a second term heading a country troubled by corruption, insecurity and a weak economy.

Buhari, a former military dictator from the north, faced a strong challenge from top opposition candidate Atiku Abubakar, a former vice president and businessman, in a race many saw as too close to call.

As of midnight, Abubakar had won three southern states and the territory that includes the capital, Abuja. Buhari led by more than 450,000 votes overall.

Abubakar's party chairman, Uche Secondus, accused ruling party agents of hacking into the electoral commission's computer server and manipulating results. He rejected the count as "incorrect, thus unacceptable."

The ruling party dismissed the claim and accused Abubakar's party of trying to discredit the election. Spokesman Festus Keyamo urged the opposition not to "derail us to the dark past with its childish antics."

Final results are expected on Tuesday or Wednesday.

African Union observers called the political climate "largely peaceful and conducive for the conducting of credible elections" but urged the country of some 190 million people to remain calm.

A Nigerian civil society platform, the Situation Room, noted "major logistic lapses" in the vote. The election was a step back from 2015, praised as one of Nigeria's most transparent and efficient votes, the group said.

At least 39 people were killed in voting-related violence over the weekend. Election observers organized by the Commonwealth, of which Nigeria is a member, called that "deeply troubling," saying Africa's largest democracy can do better.

"The peaceful achievement of millions was overshadowed by the violence of a few," U.S. Ambassador Stuart Symington said.

Nigeria's election was originally scheduled for Feb. 16 but the electoral commission postponed it just hours before polls were to open, citing logistical issues. The late arrival of election officials and materials, as well as malfunctions and harassment, caused voting to continue in parts of the country into Sunday.

The delays "risk undermining citizen confidence in elections and disenfranchising voters," the U.S.-based International Republican Institute and National Democratic Institute observers said. European Union observers said many people were discouraged from voting.

It was not yet clear how many of Nigeria's estimated 73 million eligible voters turned out. The YIAGA Africa project, which deployed more than 3,900 observers, put it at between 36 percent and 40 percent, down from 44 percent in 2015. It projected that no runoff election will be needed.

Widespread concerns continued about possible incitement to violence by the major political parties, the U.S.-based observers said, while noting that Nigerians have showed resilience and patience.

Supporters of Buhari and Abubakar briefly confronted each other in the northern city of Kano, pulling knives and machetes. The overall mood was celebratory, however, as the ruling party anticipated victory in Nigeria's largest city and the heart of the largely Muslim north.

The president is widely seen as being relatively upright in a country riddled with corruption. But some voters said he has not delivered on his promises.

"I believe we need a change," said 34-year-old Cosmos Eze in Kano, as a television in his auto parts shop broadcast election results.

Shops along his street are sprinkled with names like Blessed, Success and Godswill, but workers grumbled. Nigeria's economy dipped into a rare recession in 2016 when global oil prices crashed, and unemployment shot up to 23 percent. Recovery from the recession has been slow.

A bag of rice that was 7,500 naira ($20) before Buhari took office is now twice that, said Nasir Auwal, a 35-year-old bank worker.

He supported the president, however, saying the threat from the Islamic extremist group Boko Haram has essentially disappeared in the city that once saw scores of people killed.

"Before, when I left my house, my wife would cry because she was afraid I would not come back," Auwal said. The extremists were largely pushed out of communities under Buhari but have made a deadly resurgence in recent months, attacking military bases in the northeast.

Waiting for the announcement of a winner, 48-year-old shop worker Innocent Akannam repeated the wishes of many Nigerians.

"What I'm expecting after the final results is, let there be peace," he said.

———

Associated Press writer Cara Anna reported in Kano, Nigeria, and AP writer Jerome Delay reported from Abuja, Nigeria. AP photographer Ben Curtis in Kano contributed to this report.

———

Follow AP's full coverage of the Nigeria elections here: https://www.apnews.com/Nigeria

———

Follow Africa news at https://twitter.com/AP—Africa