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.
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.
And violence against protesters mounted.
"Frenzied putschist forces are attacking protest gatherings in separate parts nationwide," said the Sudanese Professionals Association, an umbrella of unions which were instrumental in the late 2018-2019 anti-Bashir protests.
It said the "vengeful" attacks followed Hamdok's release.
Witnesses in the east Khartoum district of Burri said security forces fired tear gas at protesters blocking a main road in opposition to the coup.
Money on the line
Internationally, Burhan's declaration of a state of emergency and dissolution of government provoked an immediate backlash.
Washington, 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 30 October.
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 spoke with Hamdok Tuesday, the State Department said, welcoming the prime minister's release from custody but expressing "deep concern" about the takeover and reiterating US support for a civilian-led democracy.
Blinken called for the military to release all civilian leaders and to use restraint in dealing with protesters, State Department spokesman Ned Price said in a statement.
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.