The British academic jailed for spying in the United Arab Emirates (UAE) has told how he endured "psychological torture".

Matthew Hedges, 31, said he was forced to stand "all day" in ankle cuffs, suffered panic attacks and had suicidal thoughts.

Mr Hedges, who denies being a spy, told the BBC he only confessed to being a captain in MI6 to stop the "torture".

He said the UAE asked him to act as a double agent in the UK Foreign Office.

Mr Hedges had denied spying and said he had been researching his PhD, but was jailed for life last month.

The UAE government said the Durham academic was "100% a spy", but pardoned him on 26 November. The leader of MI6 has said he is "perplexed" about the UAE's reasons for jailing Mr Hedges.

The PhD student told John Humphrys on Radio 4's Today programme that being in a cell had been "lonely and isolating".

He was given a "cocktail" of medication to treat his depression and anxiety, he said, and deprived of natural light.

"I wasn't allowed to do anything to distract myself. My mental health was deteriorating," he said.

"I was handcuffed and blindfolded. I had to stand all day in ankle cuffs."

Visits to the bathroom were accompanied by four guards, he said.

Mr Hedges said standing in ankle cuffs was "mentally exhausting", but that adrenaline would kick in and help him cope.

Shortly before his arrest he was due to have counselling to deal with anxiety and depression.

"I could not manage my thoughts throughout the incarceration," he said.

Mr Hedges also said he regularly had panic attacks and some nights he dreamt of hanging himself in his cell.

He said he was only able to speak to his wife Daniela Tejada - who had been campaigning for his release - once a week.

During hours of interrogations he said the psychological pressure was so great he confessed.

"I panicked and told them I was a captain in MI6. I told them what they wanted to hear."

He also spoke of how he felt when he was sentenced to life in prison.

"It was total shock, I wasn't able to process it. I couldn't say goodbye to Danni."

Ms Tejada said academics would now have to think twice before doing research in the UAE.

She said: "At the heart of it it's about drawing red lines. I think the biggest issue is naturally the fact that there is no academic freedom in the UAE but also the fact that the red lines aren't clearly drawn.

"So it's sort of every man on their own. Each academic will have a different experience, to assess how safe it is to do research."

Durham University said it had a second PhD student in the UAE but they would not be required to return to the UK.

A spokesman said it was advising a moratorium on travel to the country for "all non UAE staff and students".