After noticing the two separate carloads of undercover police following him to Qatar’s main airport, Krishna Upadhyaya realised his arrest was imminent and prepared for the interrogation that he knew would follow.

The previous night the British human rights worker and his colleague Gundev Ghimire had barely slept while they protected the material they had spent a week collecting, which chronicled the abuse of migrant labourers by uploading it to secure websites.

Within hours both men, who had noticed the plain clothes officers tracking them two days previously, found themselves in sparse, permanently lit cells in a high-security detention unit in the Qatari capital Doha facing days of questioning by investigators about their research for a Norwegian charity.

Their ordeal, which involved 10 days being held in solitary confinement followed by a further eight waiting for permission to leave the wealthy Gulf state, finally ended this weekend when they were allowed to fly back to London to be reunited with their relieved families.

In his first interview since returning home, Mr Upadhyaya, 51, told The Independent that he had been repeatedly questioned by officers about the motivation behind his work to catalogue the poor living conditions of Nepalese migrant labourers involved in preparing the country for 2022 World Cup.

He revealed that he had been required to surrender the passwords to his personal and work email accounts by investigators who were determined to piece together his movements using material gathered from his seized video cameras, mobile phones and a computer.

Qatar, whose gas wealth gives it the highest per capita income in the world, has been strongly condemned by international groups for the working conditions of 1.4m migrant labourers, many of them from south east Asia, as it pours £123bn into new infrastructure ahead of the showpiece football tournament.

The country insists it is reforming labour laws and improving health and safety after the deaths of hundreds of workers. But the treatment of the two Britons casts new light on the lengths to which its authorities are prepared to go to monitor potential critics.

Mr Upadhyaya and his colleague were arrested at Doha airport (Getty)

Qatari officials refused to disclose the reason for the arrest of the two men other than stating that they had broken unspecified laws. The Independent now understands that they were formally charged with having wrongly entered Qatar on tourist visas and holding “illegal documents” believed to be their videos and research notes.

Speaking at his home in north west London, Mr Upadhyaya said: “There were very concerned to learn exactly what we had been doing and why I was focusing on Qatar and why, as they saw it, I wanted to portray a negative image of their country. They were particularly sensitive about anything linked to the World Cup.

“I knew we had done nothing wrong and we were there to help people who are in a bad situation but our treatment was alarming. When you are being held alone in a cell with only a low bed, no windows and the lights on day and night it is hard.”

The Britons, who are both of Nepalese origin, had spent three days in the Qatari capital Doha interviewing Nepali workers as well as recording and photographing their living conditions, including one group of six men living in a single 3m-wide room with minimal facilities.

It was shortly before they were due to return home that they realised they had attracted the attention of the security forces and began to safeguard their work by sending it to data sites outside Qatar.

Their disappearance the following day as they reached Doha airport caused worldwide headlines and a warning from their employer, the Global Network for Rights and Development (GNRD), that they believed the men could be at risk of maltreatment following previous evidence of torture of detainees in Qatar.

Mr Upadhyaya said that he had suffered no mistreatment but expressed concern saying he and his colleague had been held without access to a lawyer and his location kept from British diplomats for a week before they could receive consular help.

Both men were detained for 10 days in solitary confinement (Getty)

He said: “Even though we sent our material out we were careful to leave everything on the computer to be transparent about everything we were doing. I knew they would confiscate and search our equipment so we even left it in a clearly-labelled folder on the laptop.

“The interrogators were civil but I was questioned at length for three days. Then we were left in this very bare cell for another six or seven days. I had nothing. Nothing to read.

“It is at that point that you can go a bit crazy but I tried my best to be philosophical - I meditated and looked for some freedom in my soul.”

After being brought before prosecutors and formally charged the men were told the case against them would not be pursued and they were released. But it took another eight days, during which they were effectively confined to their hotel, before the pair were told their paperwork had been finalised.

Mr Upadhyaya said his detention had been traumatic for his family, especially his eight-year-old daughter, who had been found crying in a corner one night while using her mother’s mobile phone to try to ring her father.

The researcher, who said he now intends to complete his work and publish his report later this month, revealed that as well as being anxious to see his loved ones he had spent his time in custody concerned about another major event.