A man sold into slavery as a child has won a court victory as judges declared that guidance on immigration rules for trafficking victims was unlawful.
Three senior Appeal Court judges overturned two Home Office decisions in a case brought by a 40-year-old Ghanaian man with a "terrible story".
In a ruling on Tuesday, they said current provisions impose "too high a threshold" when considering victims' personal circumstances.
Lord Justice Hickinbottom, sitting with Lord Justice Singh and Lord Justice Patten, found the Home Office policy guidance fails to meet the UK's obligations under the Council of Europe's Convention on human trafficking.
The judge said: "On any view, the appellant's story of being the victim of human trafficking is a terrible one."
The man, who cannot be identified, was sold into slavery aged three and suffered years of physical and sexual abuse before being trafficked to the UK in his 20s.
His traffickers took his passport and he was forced to work in a warehouse and as a male escort before he was eventually able to escape his oppressors.
He fled to London, where he worked as a cleaner, and started a relationship with a woman he had a child with.
In 2010 he was jailed for possessing false identity documents and was in and out of immigration detention after his release.
While in detention he came to the attention of a charity, which considered he had been trafficked and referred him to the Home Office.
The Home Office concluded he was a trafficking victim, but refused to grant him a residence permit in 2013 and again in 2015.
While it was accepted the man suffered from a number of medical conditions, including post-traumatic stress disorder and depression, the Home Office considered he would be able to receive treatment in Ghana.
Lawyers for the man argued the Home Office guidance on trafficking victims, which was used to reach those decisions, was "unlawful".
They said the words used, that an individual should only be given permission to stay in the UK if their personal circumstances were "compelling", did not reflect the human trafficking convention designed to protect victims.
Allowing the appeal, Mr Justice Hickinbottom said the current guidance "neither requires nor prompts" a decision-maker to consider if it is necessary to allow a trafficking victim to remain in the country for the "purposes of protection and assistance".
He added: "As a result, in my view, it does not reflect the requirements of (the convention) and is unlawful."
The judges quashed the two Home Office decisions which refused the man a UK residence permit.