(CNN)A British academic has left jail on bail after being detained in the United Arab Emirates for almost six months on spying allegations.
British academic accused of spying by UAE released on bail
UAE officials arrested Matthew Hedges, a 31-year-old specialist in Middle Eastern studies at Durham University in England, at Dubai Airport on May 5.
He had been in solitary confinement until his release, his wife Daniela Tejada said in an open letter on her Twitter account.
Last week Hedges appeared at the Federal Court of Appeal accused of spying for the UK government, the Press Association reported.
The UK Foreign Office on Tuesday confirmed his release on bail.
"We are monitoring developments closely and have made the Emirati authorities aware of all our concerns," a spokeswoman for the Foreign Office said.
"We continue to do everything we can for Matthew and his family."
Hedges' wife Tejada welcomed his temporary release but in a Twitter post on Tuesday added: "I cannot allow myself to get too excited by this information as Matt is not fully free yet.
"Above everything, I hope that justice will be done and Matt is granted his rightful freedom -- something that he's been unjustly denied in the last six months."
An open letter to the UAE calling for Hedges' immediate release has been signed by more than 500 academics across the world, said Tejada.
The letter says that since Hedges' arrest, his physical and mental health had deteriorated to the point where he was expressing suicidal thoughts.
The British academic had to sleep on the floor for months, and was denied access to regular showers and reading material, the letter said.
Hedges had been in the UAE to conduct interviews for his PhD thesis examining civil-military relations in the wake of the Arab Spring, according to the letter.
He had permission to be in the country and conduct interviews with officials, it added.
Durham and Exeter Universities, where Hedges also studied, said in a joint statement that they were "deeply concerned" for his welfare.
Hedges' next court appearance is scheduled for November 21, said Tejada.