– The borders were closed. Shops. Universities, offices and airports too. Tens of thousands of soldiers, observers and election officials were deployed around the country. Nigerians spent their savings, and risked their lives in some cases, to travel back to their hometowns to vote. And when they went to sleep on Election Day eve, everything seemed to be in order for a day expected to reaffirm the transition to democracy in Africa's most populous country.

The reality deflated much of that excitement and risked fanning the flames of unrest. Around 3 a.m., just five hours before polls were to open, Nigeria's election commission announced a postponement until next Saturday after apparently realizing that large quantities of voting materials were not in place.

"Nobody knows what is going on," said Muhammed Hammidu, a pepper farmer in his home village of Pariya, near the northeastern city of Yola. "Rumors are flying like crazy."

Both of Nigeria's biggest political parties condemned the delay, claiming that they were unaware of the election commission's ­unpreparedness.

President Muhammadu Buhari said he was "deeply disappointed" and appealed to Nigerians to "refrain from all civil disorder and remain peaceful, patriotic and united to ensure that no force or conspiracy derail our democratic development." His main challenger, Atiku Abubakar, also called for calm.

This year's election is seen as a chance to shore up Nigeria's democratic institutions, 20 years after the country formally made the transition to a civilian government after decades of military rule. Many are suspicious of Buhari's commitment to free and fair elections, and the delay has already elicited a deluge of conspiratorial theories on social media.

"This dents the credibility of the election, because at best, the election commission was incompetent," said Amaka Anku, a Nigeria analyst at the Eurasia Group. "They couldn't figure this out until 3 in the morning? Like, there are no excuses. How could they not know? That's what everyone will be asking."

Anku and other analysts have maintained that the likelihood of political violence is low because Buhari and Abubakar are both Muslims from the same ethnic group, lessening the sense of rivalry that has driven bloodshed in the past. The delay slightly raises those fears, said Anku, but the larger concern is greatly depressed turnout.

The party backing Abubakar accused Buhari's administration of "instigating this postponement" with the aim of ensuring a low turnout.

"You can postpone an election, but you cannot postpone destiny," Abubakar tweeted.

Buhari said the commission had "given assurances, day after day and almost hour after hour, that they are in complete readiness for the elections."

Each of Nigeria's past two elections have been delayed, though the election commission had assured voters as recently as last week that there was "no room" for postponement this time.

The Associated Press contributed to this report.