Sudan PM released as protesters face tear gas
Hamdok was "under close surveillance" while other ministers and civilian leaders remained under arrest, his office added, after the army dissolved Sudan's institutions on Monday.
Earlier in the day, the US had said it would suspend aid over the coup and the EU had threatened to do the same.
Meanwhile UN Secretary General Antonio Guterres demanded Hamdok "be released immediately" ahead of an emergency Security Council meeting that began at 2000 GMT.
The talks among the top UN powers could produce a joint text condemning the putsch later Tuesday or on Wednesday, a diplomat speaking on condition of anonymity said.
Before the meeting, Dmitry Polyanskiy, Russia's deputy ambassador to the UN, said the council "should appeal to stop the violence from all sides."
The coup comes just over two years into a delicate power-sharing arrangement between the military and civilians after the army's ousting during enormous street protests in April 2019 of longtime autocrat Omar al-Bashir.
Top General Abdel Fattah al-Burhan had earlier vouched for Hamdok's "good health", while a military source who requested anonymity said Hamdok had been escorted home, with "security measures" erected "around the perimeter".
Angry citizens stood their ground on barricaded streets where tyres burned, chanting "No to military rule", the day after four people were shot dead by security forces, according to a doctors' group.
In a late Tuesday incident, witnesses in the Bari district of Khartoum said security forces fired tear gas at protesters blocking a main road in opposition to the coup.
Internationally, Burhan's declaration of a state of emergency and dissolution of the government also provoked an immediate backlash.
The United States, a key backer of the transition, strongly condemned the military's actions and suspended hundreds of millions of dollars in aid, before the European Union late Tuesday threatened "serious consequences" for Sudan's rulers, including suspension of financial support.
Sudan risks "going back into a period of being shunned by the rest of the world" and losing badly needed financial aid, said Alex de Waal, a veteran expert on Sudan who is executive director of the World Peace Foundation.
Hamdok's government earlier this year unlocked international financial assistance, after it was frozen for years under Bashir.
On Tuesday the country was already physically cut off. The aviation authority said all flights have been suspended until October 30.
Sudan's ambassadors to Belgium, France and Switzerland on Tuesday made clear their allegiance to the civilian leaders, declaring their diplomatic missions as "embassies of the Sudanese people and their revolution", according to the Information Ministry.
Shops around the capital were shuttered following calls for a campaign of civil disobedience.
"We will only leave when the civilian government is restored," said 32-year-old demonstrator Hisham al-Amin.
It was the latest coup in one of the world's most underdeveloped countries, which has experienced only rare democratic interludes since independence in 1956.
Analysts said the generals are trying to maintain their historic control.
US Secretary of State Antony Blinken has expressed concern over the reported use of live ammunition against protesters.
A troika of countries previously involved in mediating Sudanese conflicts - the US, UK and Norway - said "the actions of the military represent a betrayal of the revolution".
The African Union and Arab League also expressed concern.
Bashir, who ruled Sudan with an iron fist for three decades, is in jail in Khartoum following a corruption conviction.
He is wanted by the International Criminal Court on charges of genocide over the civil war in Darfur.
The 2019 power-sharing deal after his fall saw Sudan ruled by a Sovereign Council of civilian and military representatives tasked with overseeing a transition to a full civilian government.
In recent weeks, the cracks in the leadership had grown wide. The civilian movement that spearheaded demonstrations against Bashir split in two and the splinter group sided with the military.
Tensions had long simmered within that movement, known as the Forces for Freedom and Change, but divisions ratcheted up after what the government said was a failed coup on September 21 this year.
Burhan had dismissed as "slander" suggestions that the army was involved in that manoeuvre.
Analysts have expressed concern that resistance to the coup could be brutally repressed.