Electoral officials start the counting operations at a polling station in Lagos, Nigeria. (Emmanuel Arewa/AFP/Getty Images)

Nigerians waited anxiously Sunday as the results of a bitterly contested presidential election were tabulated, a pivotal moment for Africa’s largest democracy and the region as a whole.

While many voters here celebrated the conclusion of a peaceful election day, others expressed concerns that the announcement of the country’s next leader could be met with violence. That’s what happened after the last election in 2011, when hundreds were killed in Kaduna, a northern state where voters are split between the two parties.

Yohanna Buru began the day leading services at Christ Evangelical Church, and the election was woven throughout his Palm Sunday sermon. He knew that, in Kaduna, violence could emerge along a religious fault line, just as in 2011, when mosques and churches were attacked.

“As they conclude the election, we pray for peace,” he told his congregation, which sat under a large white tent.

The results of Saturday’s poll are expected Monday, but glitches in the country’s electoral process could delay the announcement.

Officials from the Independent National Electoral Commission collate figures from the presidential election in Katsina State on March 29, 2015. (Pius Utomi Ekpei/AFP/Getty Images)

U.N. Secretary-General Ban Ki-moon said voting had been “largely peaceful and orderly.”

On Sunday, supporters of opposition candidate Muhammadu Buhari, a former military dictator, staged a protest in southern Rivers state, alleging that election officials there had colluded with the ruling party to rig the election. The head of the country’s election commission, Attahiru Jega, said he was “concerned” about the allegations.

The election was delayed by six weeks to make time for a multinational counter­­offensive against Boko Haram insurgents. But while that counteroffensive appears to have been successful, it will be up to the next president — Buhari or the incumbent, Goodluck Jonathan — to root out militants from their rural hideouts.

Crucial economic choices lie ahead, too, as the price of oil, which has for years buoyed the country’s economy, falls, and Nigeria’s institutions remain plagued by corruption.

For now, both sides are adamant that their candidate won.

At a site where ballots were counted Saturday, Ayok Daadanboy, a representative of Buhari’s party, was so pleased with the results from his corner of Kaduna that he left to buy a bottle of champagne.

“The celebration is going to be huge,” he said.

Nigerian election officials tally the ballots received from polling stations in Kaduna, Nigeria Sunday, March 29, 2015. (Jerome Delay/AP)

A few miles away, in a Christian neighborhood where Jonathan supporters predominate, people spoke with the same confidence.

“It’s impossible that Goodluck will lose,” said Justin Daniel, a university student.

Although both candidates signed a “peace pact,” pledging to avoid post-election violence, some of their supporters have suggested that things could devolve.

“The pact was just ceremonious,” said Abdullahi Bayaro, a trader. “We can see on social media that the [All Progressives Congress] will win. If they don’t, there will be chaos,” he said, referring to Buhari’s opposition party.

Many voters, like Bayaro, spent their days scrolling through commentary on Twitter and Facebook, including posts recounting party-led efforts to tabulate the results early. Those posts appeared to reinforce the inevitability of victory for both sides. Others watched the endless local television coverage of the election, or held portable radios to their ears, waiting for a more official announcement.

At his home, Mallam Nasir El-Rufai, who was running for governor of Kaduna, sat with supporters who scoured all forms of media for any sign of the election results. El-Rufai, in a white Harvard sweater (he graduated with a master’s degree in public administration) appeared confident of victory. But he knew how volatile the elections could be.

“There can be a mob mentality,” he said. “The passion I have seen can be hard to contain.”

Still, El-Rufai and other leaders of both parties encouraged their followers to remain civil in the wake of election results. And in Kaduna, they hoped that in a state with a volatile political division, voters had learned from the disaster of 2011.

“Election day was peaceful,” said Buru, the pastor. “And we pray that it will remain that way.”

Read more:

Nigerian presidential vote is extended amid glitches and fears of violence

Who are the two candidates running to become the president of Nigeria?

Mystery surrounds kidnapping of American missionary in Nigeria

Today's coverage from Post correspondents around the world