UK Home Office efforts to deport an HIV-positive Zimbabwean man because of his lengthy criminal record have been blocked after the supreme court ruled removing him would breach his human rights.

Sending the 33-year-old man, identified only as AM, back to Zimbabwe would deny him access to life-saving treatment with the anti-retroviral medication Eviplera, the court unanimously accepted. The drug is not available there.

The case has been sent back to the lower courts for reconsideration.

AM was born in Zimbabwe in 1987 and came to the UK in 2000. He and his mother, who had already been living in Britain, were granted indefinite leave to remain in 2004.

In the following years, he accumulated convictions for battery, assault, receiving stolen goods and twice for possession of a blade in public. In 2006, the Home Office first made an order to deport him. He has since married and had a son.

Three years later, he was convicted of further serious offences including possession of a firearm and heroin with intent to supply. He was jailed for nine years.

In 2012 his lawyers challenged the Home Office deportation order, submitting evidence that he had first been diagnosed with HIV in 2003 but that he had not become seriously ill until later.

The first anti-retroviral drug produced severe side effects. When he was switched to Eviplera his blood count increased and he recovered.

Opening the judgment, Lord Wilson said: “This appeal requires the court again to consider one of the most controversial questions which the law of human rights can generate.

“It relates to the ability of the UK to deport a foreign citizen who, while lawfully resident here, has committed a string of serious crimes. The reaction of many British citizens is likely to be: ‘We don’t want this man here.’ His response is: ‘But I need to remain here.’.”

AM originally appealed against removal on the grounds that it would breach article 8 of the European convention on human rights, which guarantees the right to private and family life.

A recent test case against Belgium at the European court of human Rights in Strasbourg established the principle that under article 3 of the convention, which outlaws torture and inhuman treatment, those with serious ill health cannot forcibly be removed to another country if they would suffer there a substantial reduction in life expectancy.

The appeal court was bound by legal precedent and could not permit the claim to switch from article 8 to article 3. The supreme court, however, can do so.

Delivering judgment, Wilson said: “This is not one of those highly exceptional situations in which we should decline to follow a decision of the Strasbourg court.

“We therefore allow the appeal and remit the appellant’s proposed claim under article 3 for consideration by an immigration tribunal, which will no doubt seek to conduct a full inquiry into (among other things) the adequacy of the medical treatment likely to be available to the appellant in Zimbabwe.”