Detained Stirling University student Muhammad Raud Waris was granted bail this morning.
It is believed he will shortly be released from Dungavel Immigration Removal Centre after being detained there for more than two months for allegedly breaching the terms of his visa.
SNP MP for Stirling, Alyn Smith – who wrote to the Home Office on August 12 calling for an explanation for the detention – said Waris's expected release was "welcome news".
He added: "But the question remains how on earth was he kept in so long and why on earth did his case go so slowly?
A spokesperson for Waris said they now hope Waris can get back to his normal life.
They added: "We are absolutely delighted that Mr Waris was granted bail this morning and believe that he will shortly be released from Dungavel.
"We shall now focus solely on trying to resolve the matters surrounding the revocation of his student visa as he continues to deny the allegations against him. We hope that thereafter he can continue to focus on his studies and get back to his normal life."
The Pakistani national previously exclusively spoke to The National where he said he believed immigration officers had detained him without good reason and that he was suffering mentally and physically as a result.
Waris was arrested by officers at his place of work on June 15 and has been in Home Office custody since then.
He said he had been commuting between Stirling and Rutherglen, where he was staying while in Scotland, and that he had been working at a grocery shop in Glasgow, where the Home Office alleged he was working over the legally-permitted number of hours.
Foreigners studying in the UK can work up to 20 hours on a student visa, a limit Home Office sources said they have credible evidence to prove Waris has breached, though they have refused to share this with The National.
Waris previously (above) told The National he was in "mental torture" at Dungavel.
He added: “I am already suffering the sickness, when I try to eat […] have just a little bit bite to eat. I even request a doctor so to refer me to a hospital, but she said according to our examination you don’t need it. I don’t know why she said it.
“I am on a medication more than two months – anxiety, stress, sleeping, painkillers morning and in the nighttime.”
Waris also said he wanted to continue his studies when released, saying: “I am a student, I need to make my degree, my degree is my priority and my goal and my ambition.”
Smith said: "The Home Office officials are themselves under terrible pressure from this awful UK government, and it is more and more obvious to me that we need to see the powers over immigration come to Holyrood where we will I have no doubt design a better, fairer and probably cheaper system.
"But tonight at least I'm glad that he is with his friends and family and glad I was able to help."
When contacted for comment, the Home Office said they couldn't comment on individual cases.