The deportation of a criminal to Zimbabwe has been stopped by the Supreme Court amid concerns his life would be shortened by HIV.
Five justices unanimously ruled the case must be reconsidered in full by immigration judges.
The offender has fought deportation for 14 years and won the reprieve after a decision in a similar case at the European Court of Human Rights.
The ruling changes UK law which previously allowed such deportations.
The 33-year-old offender, known only as AM, came to the UK as a teenager and since then has been convicted and jailed for serious offences, including battery and possession of a firearm. He is married to a British woman and they have a child.
Throughout his legal battle with the Home Office to remain, he has been receiving treatment with a specific anti-HIV drug that has stabilised his condition, but it is said not to be available in Zimbabwe.
During earlier stages, judges refused to stop his deportation because of long-standing case law in the UK that it was not a breach of human rights to send someone back to a country with poor medical services, if their life was not immediately in danger.
However, judges at the European Court of Human Rights later ruled that a deportation could be inhumane if the individual's life would be significantly shortened by the absence of suitable medical care for their condition.
In practice that meant someone with a potentially life-threatening medical condition could not be removed from a European country unless there was some assurance about the care they would receive.
That decision by the Strasbourg judges changed the previous position in human rights law - and AM argued that he could no longer be deported until evidence about Zimbabwe's health system had been fully considered.