The 29-year-old, who cannot be named for legal reasons, has been released from jail and is now free to roam the streets after Lord Justice Maurice Kay said that sending him back to Jamaica would violate his human rights as a homosexual.
The judge referred to Article Three in the Human Rights Act, which protects an individual from inhuman or degrading treatment.
The murderer, referred to only as JR, arrived in the UK in December 2000 when he was 15, and, with another person, was 'party to the murder of another teenage boy' less than a year later in 2001, the judge said.
He and his co-defendant were convicted of murder and sentenced to detention at Her Majesty's pleasure in September 2002, before being freed from prison in June 2012.
Ever since he was released, Theresa May, the Home Secretary, has been battling to have him sent home.
JR successfully appealed her decision to deport him to the First-Tier Tribunal (FTT), and won again at the Upper Tribunal when Mrs May challenged that decision last year.
Now, Lord Justice Kay, sitting with Lord Justice Lewison and Sir Stanley Burnton at the Court of Appeal in London, has blocked the Government's final attempt to have JR deported.
The judge said JR spent 11 and a half years in custody before declaring himself gay in April 2012.
The First-Tier Tribunal accepted he was homosexual, and that he would be at risk of 'inhuman or degrading treatment' if returned to Jamaica.The Upper Tribunal later refused Mrs May's appeal, after hearing JR's mother give evidence that she 'knew all along' that her son was gay.
His 'late disclosure' of his sexuality was said to have been 'prompted by societal attitudes, particularly that of Jamaicans towards gays'.
At the Court of Appeal, Catherine Rowlands, for Mrs May, argued that the offender's eleventh hour assertion of homosexuality should have been rejected 'on credibility grounds', as 'he had made no mention of it' during a previous asylum application.
The barrister argued that 'the claim of homosexuality was contrived and brought as a last resort to avoid deportation.'
But Lord Justice Kay dismissed the appeal, saying the FTT had obviously found JR's mother 'an impressive witness'.
He added: 'I consider that the Upper Tribunal was correct to find no error of law in the FTT's treatment of the issue of homosexuality'.
Mrs May accepted that, if the man was genuinely gay, he could not be deported, and the Upper Tribunal had also found that he 'no longer constitutes a significant danger to the community of the UK.'
The judge went on: 'It follows from what I have said that the Secretary of State's appeal must fail.'
But in a warning to any offenders hoping to avoid deportation by pretending to be gay, he added: 'I should add, however, that this case turns on its specific and quite unusual facts. It should not be seen as providing more general succour to others convicted of grave crimes.'
OTHER CRIMINALS WE CAN'T GET RID OF BECAUSE OF 'HUMAN RIGHTS'Last month Mafia don Domenico Rancadore escaped deportation to his native Italy after a British judge ruled that the cramped Italian jails would breach his human rights.
The 65-year-old who fled arrest in Italy 20 years ago and came to Britain, where he has lived ever since, was sentenced to seven years in prison in his home country for running a branch of the Mafia involved in drug trafficking, extortion and racketeering.
In December 2013 a Somali criminal with a history of violence was allowed to walk free after a High Court judge ruled that detaining him any longer would breach his human rights.
Abdi Ismail, 33, was convicted of a string of crimes since arriving in Britain in 1993, including racially aggravated threatening behaviour and assault on police.
In 2011, he was sentenced to a 15-month jail term for assault and told he would be deported after attacking a friend with a knife, but a judge let him walk free after deciding he had been detained for too long.
Last year, a vicious Somali rapist who was jailed for ten years after threatening to kill his pregnant victim as he raped her was allowed to stay in Britain because he has other family members here.
Mustafa Abdullahi, 31, came to Britain aged 11 and immigration judges ruled he had been in the UK so long that deportation would deprive him of the right to a family life.