Moves to deport a convicted killer have been blocked by the High Court.
A judge has ruled that Eric Erron Johnson, jailed for nine years for manslaughter, has been discriminated against because he is an illegitimate child.
The son of a British citizen, Johnson was born out of wedlock to a Jamaican woman.
Because he was illegitimate he was not entitled automatically to become a British citizen on birth, and then did not apply before he was 18.
Mr Justice Dingemans, sitting in London, has ruled there has been a violation of his human rights.
The judge said it would be open to an immigration tribunal to conclude that Johnson cannot be deported because he has "unjustifiably" suffered discrimination as an illegitimate child, in violation of Article 14 of the European Convention on Human Rights (ECHR), which protects against discrimination, and Article 8 (right to private and family life).
The judge quashed a Home Office decision to certify the 29-year-old's human rights claim was "clearly unfounded" and said there must be further consideration of his case.
The quashing opens the way for Johnson, from west London, to appeal to an immigration tribunal against the Home Office refusal to revoke the deportation order.
A supplier of class A drugs, he killed a man by hitting him with a piece of wood and then stabbing him. He was facing deportation to Jamaica.
The judge described how his London-born father went to Jamaica and had a relationship with his natural mother, but they did not marry.
Johnson was registered as a Jamaican national. At the age of four he came to the UK with his father and lived with his father's new wife and his half-brothers. In March 1992 he was granted indefinite leave to remain in the UK and lived in the country ever since.
At the age of nine he visited his natural mother in Jamaica, but that was the last contact he had with her.
Neither he nor his father made an application for him to acquire British citizenship before he was 18, although it would probably have been granted under the then existing rules.
The judge said Johnson now had "a very serious criminal record" with offences committed over a five-year period since he became 18 in 2003.
The judge described him as "a supplier of class A drugs for commercial gain". He was convicted of manslaughter in August 2008 after a trial in which he falsely claimed to have acted in self defence.
The Home Office immigration authorities began moves to deport him in March 2011 on the grounds that he was "a foreign national" whose removal would be "conducive to the public good".
The judge said that, under human rights laws, "it is not permissible to treat children born out of wedlock as having no links with their parents... in this case paternity is established."