Nigeria has delayed its presidential and parliamentary elections for a week, in a dramatic night-time move.
The Independent National Electoral Commission (Inec) made the announcement just five hours before the polls were due to open on Saturday.
"Proceeding with the election as scheduled is no longer feasible," commission chairman Mahmood Yakubu said, citing logistical issues.
The two main candidates have asked people to remain calm and be patient.
Mr Yakubu said the difficult decision to postpone was needed to ensure a free and fair vote.
The presidential and parliamentary votes have been rescheduled for Saturday 23 February.
Governorship, state assembly and federal area council elections have been rescheduled until Saturday 9 March.
The announcement came after an emergency meeting at the Inec headquarters in the capital, Abuja.
What's the reaction?
Nigeria's two main political parties, the ruling All Progressives Congress (APC) and the People's Democratic Party (PDP), swiftly condemned the move and accused each other of trying to manipulate the vote.
President Muhammadu Buhari, of the APC party, urged calm and appealed to Nigerians to "refrain from civil disorder and remain peaceful, patriotic and united to ensure that no force or conspiracy derail our democratic development".
His main rival Atiku Abubakar has called for calm over the next seven days saying: "I'm appealing to Nigerians to please come out and vote and I'm asking them to be patient about it."
Voters have reacted with a mixture of anger, frustration and resignation.
Responses to Inec's tweet about the postponement were brutal with one man calling it "the height of incompetence".
The height of incompetence! You waited till 3am nigerian time to break a news as crucial as this? After 3 whole years which you had to plan. What a Joke!— Femi (@femiakande_) February 16, 2019
Another described Inec as "a huge disgrace".
You had 4 years and more than enough financing and you give us this.— Kachi Ben Nnagha (@deekaachii) February 16, 2019
The INEC of today is a huge disgrace and one of the institutions that'd need to be repositioned once a new govt takes over.
I never had faith in this current INEC Chair and he just justified my reservations.
Many had made long journeys to vote. In the northern town of Daura, Musa Abubakar, who had travelled 550km (342 miles) from Abuja to take part in the election, told the BBC that he "couldn't believe" what had happened.
Hajiya Sa'adatu said she was "greatly disappointed" to learn of the delay when she came out to cast her vote in the northern city of Kano.
But others have been saying that the postponement should mean that everything goes smoothly next week.
Michael Momodu, in Delta state south-east Nigeria, said that he still believed that "the right things will take place" and that "God will deliver".
Why have elections been postponed?
Election chief Mahmood Yakubu said the decision was made following a "careful review" of the election "operational plan", adding that there was a "determination to conduct free, fair and credible elections".
He said the delay was necessary to give the commission time to address vital issues and "maintain the quality of our elections", but did not provide further details.
Breaking News: The #NigeriaDecides2019 Elections now to hold on; 23rd February, 2019 for Presidential and National Assembly while the Governorship, State House of Assembly and the FCT Area Council Elections is to hold on 9th March, 2019. pic.twitter.com/6zhvBLQe2a— INEC Nigeria (@inecnigeria) February 16, 2019
In the past two weeks several Inec offices have been set alight, with thousands of electronic smart card readers and voter cards destroyed.
There have also been claims of shortages of election material in some of the country's 36 states.
'Sour taste in voters' mouths'
By Damian Zane, BBC News, in Lagos
At first it seemed like another bout of fake news, but disbelief has been replaced by outrage and disappointment.
The last elections, in 2015, were also postponed, but the announcement coming five hours before the vote is a new record.
Those Nigerians who had intended to vote would have planned their day around it. The whole country was essentially going to shut down as travel was restricted, so the only options were to stay at home or go to the polling station.
Many have also already travelled to the places where they were registered to vote. They will be left wondering what they will do for the next week.
The country is known for pulling things off at the last minute, but this time it wasn't to be. This will have left a sour taste in the mouths of the electorate, which is already cynical about the political process.
Nigeria has been forced to bolster its security, with the run-up to the elections marred by violence.
On Friday, officials in north-west Nigeria reported the discovery of the bodies of 66 people, 22 of them children and 12 women, killed by "criminal elements".
How important is this poll?
The future of Africa's most populous nation and largest economy is at stake.
Whoever wins will have to address power shortages, corruption, security problems and a sluggish economy.
There are 73 registered candidates in the presidential election, but campaigning has been dominated by President Buhari, 76, and his main challenger, former Vice-President Atiku Abubakar, 72.
Mr Buhari says he has built a strong foundation for prosperity, but his rival says Nigeria is not functioning.
Both men are from the mainly Muslim north of the country. While both are in their 70s, more than half of Nigeria's 84 million registered voters are under 35.
Has Nigeria had election issues before?
Yes. Nigeria is not new to voting postponements - previous elections in 2011 and 2015 were delayed by several days.
In 2015, the country ordered the closure of all its land and sea borders ahead of tightly contested elections amid reports that foreigners planned to cross into Nigeria to vote.
That same year, one of the candidates died while the votes were being counted.