A 31-year-old doctoral student at Durham University, who was in Dubai early May and accused of “jeopardising the military, economy and political security” of the country, has appeared in court on Wednesday.

Matthew Hedges, who travelled to Dubai for a two-week research visit this year — was handed down a life sentence for spying, according to his family.

A life sentence includes a maximum of 25 years in jail and is followed by deportations for non-Emiratis. Mr Hedges will be deported upon completion of his sentence and was also ordered to pay all legal fees

UK Foreign Minister Jeremy Hunt said he was "deeply shocked and disappointed" by the verdict and had personally raised it at the highest levels of the UAE government.

Mr. Hunt said the verdict would hurt relations between the two countries and its handling by the Emirati authorities would have repercussions on relations with Britain.

"It is not what we expect from a friend and trusted partner of the United Kingdom and runs contrary to earlier assurances," said Mr. Hunt.

The case was heard earlier this month and Mr. Hedges was released on bail, while the hearing was adjourned till November 21.

However, on Wednesday an UAE court crushed the hopes of Mr. Hedges' family for his release.

Tomorrow, Nov 21, Matt will be appearing in court in Abu Dhabi. Hoping that justice will prevail and my husband will be granted his rightful freedom. #MatthewHedges pic.twitter.com/omMpJZ800B — Daniela Tejada (@dtejadav) November 20, 2018​

"We can confirm that he was sentenced to life in prison. The hearing lasted less than five minutes, and his lawyer was not present," a family spokesperson told the AFP.

Mr. Hedges' wife, Daniela Tejada, from Exeter, said he had bee held in solitary confinement since his detainment and had limited access to the UK consulate or his family.

"​Matt was told he was being charged with gathering information and sharing it with a foreign agency — the UK government. It is the duty of the Foreign and Commonwealth Office to protect their citizens abroad. This horrifying situation has been going on for far too long. This has been incredibly stressful and emotionally draining," Ms. Tejada said.

Jeremy Hunt and UK's Middle East Minister Alistair Burt have both travelled to the UAE since Mr. Hedges was detained to negotiate his case.

Met Crown Prince Mohammed bin Zayed and FM @ABZayed in UAE yesterday to discuss 🇬🇧and 🇦🇪 relations. Also raised the case of British national Matthew Hedges. @foreignoffice staff continue to support Matthew and his family and we are all hoping for a good outcome — Jeremy Hunt (@Jeremy_Hunt) November 13, 2018