A former employee of the British consulate in Hong Kong has alleged he was tortured while being detained in China during a 15-day ordeal in which he said he was accused of being a British spy and secret agent and held in solitary confinement.

The UK foreign secretary, Dominic Raab, summoned the Chinese ambassador to demand an explanation after Simon Cheng, a Hong Kong citizen who worked for the British government for two years, went public with his account of repeated physical and mental torture for the first time since his release on 24 August.

Cheng, 29, was detained while trying to return to Hong Kong from a day trip to Shenzhen, a mainland Chinese city that borders Hong Kong. In an interview with the Guardian, he said he was tortured for days before being forced to falsely confess that he and the British government had played a role in the pro-democracy protests in Hong Kong, which were largely peaceful at the time.

During lengthy interrogations in windowless rooms, Cheng said he was called “an enemy of the state” and “a British spy and secret agent” working for the UK government by his captors, who threatened him with subversion and espionage charges.

Cheng, who said he was held in solitary confinement from the second day of his detention, was also pressed to confess falsely that he “had been used by others”. He was forced to say that the British government was masterminding protests in Hong Kong and that he had secured financial aid and resources for the protesters, who the Chinese authorities insisted were “rioters”.

He was at first put in what is known as a “tiger chair” – a metal chair with bars that disables a detainee’s movements – and prevented from wearing his glasses until he was released. He was not allowed to contact his family or a lawyer.

My beloved Hong Kong has become a war zone and daily life is full of anxiety Read more

Police told him he had been reported for “soliciting prostitutes” and said that if he “cooperated” he would face a lesser punishment of administrative detention, which normally involves 15 days of detention, otherwise he would be given the much more severe punishment of criminal detention. Cheng said he had no choice but to make a false confession.

At times during his detention he was handcuffed, shackled, blindfolded and hooded, and said that being prevented from wearing his glasses made him feel suffocated and nauseated. Secret police grabbed his hair to force him to unlock his phone by facial recognition.

Later, he was removed from the detention centre and taken to an unknown location, where he was hung while blindfolded and hooded, handcuffed and shackled, on a steep “x-cross” and forced into a spread-eagled position for hours.

His captors also ordered him to squat and pose in other fixed positions for hours. When he failed to maintain the pose they ordered, they would beat his knee joints with spiked batons, making him shiver with pain. They also yelled verbal abuse at him during the whole torture process, saying he was an “intelligence officer sent by the UK” and “worse then shit”.

“There is no human rights for intelligence officers from the UK,” his captors told him.

Another police officer called him “a traitor to the motherland” and said that because Cheng was an “enemy of the state” they were able to practise “autocratic rule” on him.

Cheng said he was subjected to nights of sleep deprivation and if he fell asleep he was woken up and forced to sing the Chinese national anthem.

In the last 48 hours he was in custody, Cheng said he was interrogated repeatedly. Security police officers told him to sign documents they obtained from his phone, including printed emails from the British consulate instructing staff to monitor the protests in Hong Kong.

He was also ordered to draw a supposed organisational chart of the “core” protesters, whose conversations they found in Telegram groups on his phone. Cheng said he only had limited information but was forced to follow orders as his captors had threatened to charge him with subversion, armed rebellion and rioting, espionage or treason. He said he was terrified that he might never be released.

Cheng said he threatened to committed suicide and officers reacted angrily. “I told them if I couldn’t get out in 48 hours, I’d kill myself,” he said.

Cheng said before he was allowed out, the authorities threatened to take him back to China if he went public over his ordeal. In a Facebook statement released on Wednesday, he said he has fled to a third country for security reasons. He said that he had been granted several months of paid leave by the UK consulate and claimed he was “asked to resign” in November, ending two years of employment there.

A UK consulate source said: “Simon’s decision to resign was his own. He was a valued member of the British consulate general team.”

Cheng’s treatment echoed China’s treatment of political and human rights activists: in a widespread round-up of human rights lawyers in 2015, at least 300 legal professionals and activists were held in incommunicado detention of six months, where they were kept in solitary confinement, subjected to physical and psychological abuses and denied access to family and lawyers.

Raab said he was “shocked and appalled by the mistreatment Cheng suffered while in Chinese detention, which amounts to torture” and said he expected Chinese authorities to “investigate and hold those responsible to account”.

The Foreign Office said it had offered Cheng and his fiancee a two-year visa to come and live in the UK, and that it was possible he would be allowed to stay longer if he wished to do so after that point.

As a locally employed staff member of the consulate, Cheng does not enjoy diplomatic immunity.

The FCO said it had reviewed its advice to staff travelling into mainland China, but was not willing to discuss whether the seizure of Cheng’s phone and extraction of details of British consulate staff had compromised UK security or led to any changes in personnel.

Hong Kong’s justice secretary Teresa Cheng, speaking to reporters at the Chinese embassy in London, said the former British Foreign Office employee should report the matter to the relevant Chinese authorities.

“There are many things that are often reported and sometimes it is extremely important to gather the whole facts and veracity of it before any view is to be formed,” Cheng, who is not related to Simon Cheng, said in English when asked if she was alarmed by the account of torture.

Tom Tugendhat, the Conservative chair of the foreign affairs select committee in the last parliament, said Cheng’s account was extremely serious.

“There has been a pattern of accusations by the Chinese embassy against the UK concerning UK interference when the only real diplomatic interference that has been occurring has been by the Chinese with its Confucius centres and activities in British universities as well as other incidents listed in the recent foreign affairs select committee report,” he added.

“It all reveals a pattern of autocratic behaviour being exercised. Britain must stand up and defend itself against such abuses.”