The United Arab Emirates on Friday signaled a British academic it jailed for life on spying charges could be freed after his family appealed for clemency in a case that has strained ties between the long-standing allies.

Matthew Hedges, 31, was sentenced Wednesday on charges of spying for the British government, in a move described as deeply disappointing by Prime Minister Theresa May.

¡°Mr. Hedges¡¯ family have made a request for clemency and the government is studying that request,¡± the UAE¡¯s ambassador to London, Sulaiman Hamid Almazroui, said.

¡°We have an extremely close partnership with the U.K.,¡± he told reporters. ¡°Because of the strength of that relationship we are hopeful that an amicable solution can be reached.¡±

The doctoral student at Durham University has been held since May 5, when he was arrested at Dubai International Airport after a two-week research visit.

¡°We have asked for clemency ¡ª we will wait to see what happens,¡± Hedges¡¯ wife, Daniela Tejada, said after the ambassador spoke. She denies he is a spy.

His family have cast him as a talented researcher who fell foul of the UAE¡¯s security and justice system. The UAE cast him as a British spy who was given a fair trial for grave espionage offenses.

¡°We hope the UAE now looks favorably on the family¡¯s request for clemency,¡± a spokeswoman for Britain¡¯s Foreign Office said.

The Gulf state does not dictate verdicts to its courts and there was full and proper legal process in Hedges¡¯ case, the ambassador said. There had not been a ¡°five minute show trial¡± as he said some media had reported.

¡°This was an extremely serious case. We live in a dangerous neighborhood and national security must be a top priority,¡± said Almazroui, adding that everyone has the right to request a pardon.

¡°This was an unusual case: many researchers visit the UAE freely every year without breaking our laws,¡± he said.

Hedges¡¯ family said the evidence presented against him consisted of notes from his dissertation research.

¡°Matt was held in an undisclosed location in solitary confinement for over 5 months, with no charge, no lawyer and very limited consular access,¡± his wife said.

¡°The judicial system in the UAE and the U.K. cannot be compared. I was in the courtroom and the hearing lasted less than 5 minutes,¡± she added.

A life sentence for a non-Emirati entails a maximum of 25 years in jail followed by deportation, according to UAE state-run media.

Foreign Secretary Jeremy Hunt had warned that the verdict could hurt relations with the UAE.