An asylum seeker flown to Afghanistan despite a High Court injunction arrived back in London overnight.
Samim Bigzad, 22, was living in Ramsgate, Kent, after entering the UK illegally to join his father who was granted asylum.
Home Secretary Amber Rudd has been accused of contempt of court as the Home Office was made aware of the injunction before his deportation.
Mr Bigzad landed at 22:45 BST and was allowed to return to his foster family.
Jamie Bell, from law firm Duncan Lewis, which has been representing Mr Bigzad, met him at Heathrow airport.
He said: "This has been a very long and difficult week. For everyone involved it's been both emotionally and physically draining. But seeing Samim arrive back last night made it all worthwhile.
"He couldn't quite believe he was back and allowed to walk away free. He kept putting his head on the ground and saying how happy he was to be back.
"When he saw his foster family and his friend from KRAN he was so happy, it was a really lovely moment."
Mr Bell told the BBC the High Court injunction was granted by Justice Morris on Tuesday, while Mr Bigzad was waiting for a connecting flight to Kabul at Istanbul airport.
He said the Home Office had made an application to the Court of Appeal for Mr Bigzad to stay in Kabul but it was refused.
The firm has now commenced contempt of court proceedings against the Home Office for the decision to put him on the flight despite the order and has begun his application for asylum.
Ms Rudd told the Andrew Marr Show: "I will make sure we do the right thing."
She added that she took the matter "very seriously" and said "I will look carefully at the information and make sure we abide by the law as we always do".
Lord Falconer, the former Labour Secretary of State for Justice, tweeted: "Bigzad case suggests HO comply with court orders only if they agree with them. Wrong. Courts decide cases, not HO."
On Wednesday, Mr Bigzad told the BBC he feared for his life and had contacted the British Embassy in Kabul requesting an airline ticket back to the UK as soon as possible.
"I am scared of the Taliban," he said.
His father, for whom Mr Bigzad is the main carer, has lived in Margate for 10 years, and suffers from Post Traumatic Stress Syndrome (PTSD).