A Briton who was sentenced to prison for touching a man’s hip in Dubai has warned his ordeal could “happen to anyone”.

Jamie Harron, 27, from Stirling, urged people to be wary about visiting the Emirate and described its legal system as a “shambles”.

The electrician was arrested in July and sentenced to jail this month for “public indecency” after a Jordanian businessman complained to police that he had been sexually assaulted.

But the Scot was freed after Dubai’s ruler Sheikh Mohammed bin Rashid al-Maktoum ordered he should be exonerated.

In his first full interview since returning to the UK, Mr Harron told of sharing a jail cell with alleged murderers and his incredulity at learning he was being accused of sexual assault.

He said he briefly touched his accuser, the head of an engineering firm, to steady himself and avoid spilling a drink as he brushed past him in a crowded bar.

The contact reportedly “escalated” into an allegation that he had thrust his hands into the businessman’s underwear.

Jamie Harron returns to UK after four months imprisoned in Dubai: "I'm in total shock"

“The whole thing was a nightmare from start to finish,” he told Mail Online.

“This has ruined four months of my life – I lost all my savings, £60,000, and my job, and my reputation has been damaged.”

He added: “People should be very wary. The legal system in Dubai is a shambles and if this can happen to me, it can happen to anyone.”

Mr Harron had been on a two-day stopover in Dubai on a break from a lucrative job in Afghanistan when he was arrested following the incident in a bar and thrown into a cell at al-Barshi jail.

He said the cell was “about the size of my living room” and was shared by up to 10 men, including alleged killers.

“I didn’t shower for four days, and I was just stinking,” Mr Harron added. “I would get a bit of time each day to walk on the prison roof, but it was 50C and I would become drenched in sweat almost immediately. I had no toothbrush for five days either, and no way to keep clean.”

Several days passed before he learned he had been accused of penetrative sexual assault. He spent eight days behind bars before he was bailed and charged with indecent behaviour, as well as being drunk in public and an obscene gesture.

“I was in shock,” he told the website. “I said, ‘Of course I never did that. That man was fully clothed, and we were in a public bar.’”

The allegation of sexual assault later vanished from the charge, but prosecutors continued to pursue the case.

He was found guilty of indecency but cleared just a day later following an outcry and a campaign by the organisation Detained in Dubai.

Mr Harron suggested his accuser might have been jealous that he and a friend were talking to a young female barmaid.

He said he had no plans to return to the United Arab Emirates (UAE), adding: “The laws there are not great, and people can take advantage. It was my word against his, and it has led to this – it’s crazy.”