The Home Secretary, Theresa May, lost her landmark Supreme Court appeal today in the case of a former Iraqi refugee granted British nationality and who was later stripped of his citizenship which he said left him stateless.

The decision paves the way for Hilal Abdul Razzaq Ali Al-Jedda, who was once held as a terrorist suspect, to return to the UK from Turkey where he currently lives with his family. In a humiliating verdict the five justices said that if Mrs May’s had paid more attention to her own guidance she would have realised the “fallacy” of her appeal.

It is the first case on the issue of deprivation of nationality to reach the Supreme Court and legal experts believe it will be important in the context of the prevention of statelessness.

Download the new Independent Premium app Sharing the full story, not just the headlines

Mr al-Jedda, 56, fled from Saddam Hussein’s regime in 1992 and arrived in the UK. He was granted British nationality in 2000 and therefore automatically lost his Iraqi nationality under that country’s law.

In September 2004, Mr al-Jedda travelled to Iraq and was arrested the following month by US forces on suspicion of targeting coalition troops and was transferred into custody of British forces where he was held without charge for three years. Mr al-Jedda was released and went to Turkey.

In December 2007, shortly before his release without charge from internment, then Home Secretary Jacqui Smith deprived Mr al-Jedda of his British citizenship because of his alleged terrorist activities writing to him to say she was satisfied that in doing so “would be conducive to the public good”, citing the British Nationality Act 1981.

Legal arguments have raged for the past five years, involving hearings at the Court of Appeal and the Special Immigration Appeals Commission (SIAC), where Mr al-Jedda argued that the British government’s decision left him “stateless”.

Mrs May had argued that he would have automatically regained Iraqi nationality through an Iraqi law in force between 2004 and 2006, an argument the SIAC agreed with on two occasions. However, the Court of Appeal rejected the Home Secretary’s contention leading to a Supreme Court hearing in June and today’s verdict upholding that decision that the Home Office had acted illegally.

The written judgment said: “The Supreme Court unanimously dismisses the appeal by the Secretary of State. The Court rejects the Secretary of State’s alternative argument. From a plain reading of the statute and surrounding guidance, it is clear that the question is simply whether the person holds another nationality at the date of the order depriving him of British citizenship.”

Lord Wilson told the court that the Home Office had in February 2012 incorporated, word for word, the United Nations High Commissioner for Refugees issued ‘Guidelines for Statelessness’, which addressed some of the effects of the authoritative definition of a stateless person, into its own guidance.

He said: “The Secretary of State’s own guidance eloquently exposes the fallacy behind her appeal.”

Simon Cox, migration lawyer for the Open Society Justice Initiative, said: “The judgment is the first time a supreme court has addressed this issue. Judgments of the UK Supreme Court are highly regarded worldwide by courts and states. The judgment marks an important step in securing legal protection for stateless people.”

A Home Office spokesperson said: “We are disappointed with the Court’s decision. We are considering the judgment and our next steps in this case carefully.”

The Supreme Court did not comment on an outstanding issue of the case, namely whether not the Iraqi passport Mr al-Jedda holds is fake, which he says it is and that he needed to have to travel to Turkey in 2008. Mrs May has argued that the passport is real and that Mr al-Jedda also has a valid grant of Iraqi nationality.