Police Scotland released the two Indian nationals detained by Border Force officials in the city after people surrounded their van and prevented it from leaving on Thursday.
Demonstrators in Kenmure Street, Pollokshields, had blocked the immigration enforcement van for hours, with one lying underneath the vehicle.
Around 200 protesters were at the scene, with chants of “Leave our neighbours, let them go” and “Cops go home” being heard as a ring of police stood around the van.
In response to the scenes, the First Minister tweeted: “The Home Office needs to ask itself hard questions after today.
“Doing this on Eid, in the heart of our Muslim community, and in the midst of a serious Covid outbreak was staggeringly irresponsible – but the even deeper problem is an appalling asylum & immigration policy.”
It is understood neither of the men is Muslim.
Shortly after 5pm, Police Scotland released a statement saying the men would be released to protect public safety.
Chief Superintendent Mark Sutherland added: “Police Scotland has, following a suitable risk assessment, taken the operational decision to release the men detained by UK Immigration Enforcement back into their community meantime.”
The force asked those nearby to disperse from the area as soon as possible.
A spokeswoman said earlier: “Police Scotland does not assist in the removal of asylum seekers. Officers are at the scene to police the protest and to ensure public safety.”
One of the men, Lakhvir Singh, 34, spoke through a translator.
He said: “I’ve been astonished and overwhelmed by the support I’ve received from the people of Glasgow.
“At around 9.30am immigration enforcement carried out a raid and we were taken to security in the van.
“There were only five or six people at the time but word spread and then there were crowds of hundreds.
“We are so grateful for the support.”
Aamer Anwar, the men’s legal representative, added: “They’re elated, they’re astonished and they’re deeply grateful to the people of Glasgow for having turned up today when they were dragged out of their beds this morning.
“They thought they were going to be taken to a detention centre, they dreaded the treatment they would receive and what would happen to them.
“At the end of the day, we’re grateful to Police Scotland who saw sense in the fact that, for public safety, that these individuals should be released because the people of Glasgow said ‘we’re not moving, these are our neighbours – release them’.
“It sets a benchmark quite high for the rest of the country to follow and say that this is the way that we should treat people in society.”
Mohammad Asif, director of the Afghan Human Rights Foundation, was one of the hundreds of neighbours protesting against the action on Thursday.
The 54-year-oldsaid: “We’re here against the hostile environment created by the Tories and the British state.
“The same people who run from the British and American bombs put at the back of the van right now. And they are about to be deported.
“And it’s on Eid you know … the guys are not even allowed to pray. How do you do that in a democratic society? It’s a sad day.”
Mr Asif, who left Afghanistan as a refugee in 2000, said the atmosphere among the protesters was peaceful.
Wafa Shaheen, head of services at the Scottish Refugee Council, said she was “shaken and angry” at the Home Office’s decision to “force people from their homes on the first day of Eid” and she condemned the “heavy-handed approach”.
A Home Office spokeswoman said: “The UK Government is tackling illegal immigration and the harm it causes, often to the most vulnerable people by removing those with no right to be in the UK.”
“The operation in Glasgow was conducted in relation to suspected immigration offences and the two Indian nationals complied with officers at all times
“The UK Government continues to tackle illegal migration in all its forms and our New Plan for Immigration will speed up the removal of those who have entered the UK illegally.”