Hong Kong (CNN) A former employee of the British consulate in Hong Kong has alleged that he was tortured in China and interrogated by secret police about the city's long-running pro-democracy protests.

Cheng alleged Chinese secret police repeatedly interrogated him about the UK's role in Hong Kong's protests, and about his own participation and that of his friends.

In allegations that could inflame the protesters in Hong Kong and reinforce fears of many in the city, Cheng claimed that Chinese police told him "batches of Hong Kong protesters" had been "caught, delivered and detained in mainland China." CNN could not independently verify Cheng's claims.

China has repeatedly accused Western countries, including the UK and United States, of interfering in the semi-autonomous Chinese city and influencing the protests that have roiled Hong Kong for almost six months.

British Foreign Secretary Dominic Raab appeared to endorse many of Cheng's claims Wednesday, saying in a statement that his "mistreatment" while in detention "amounts to torture."

"Simon Cheng was a valued member of our team. We were shocked and appalled by the mistreatment he suffered while in Chinese detention, which amounts to torture," Raab said.

Raab said he has summoned the Chinese ambassador "to express our outrage at the brutal and disgraceful treatment of Simon in violation of China's international obligations. I have made clear we expect the Chinese authorities to investigate and hold those responsible to account."

Responding to Cheng's claims that he was tortured, China's Foreign Minister spokesman Geng Shuang said at a press briefing Wednesday that the Chinese public security department "guaranteed all of his rights and interests according to law."

Cheng "also made a full confession about his illegal actions," Geng said.

Geng also commented on the UK Foreign Office announcement that it has summoned the Chinese ambassador to the UK over the matter.

"I think China would firmly oppose relevant remarks from the British side. We express our great indignation towards the UK's recent series of mistaken remarks and actions," he said.

Activists gather outside the British Consulate-General building in Hong Kong on August 21, 2019.

The backstory

Cheng, who worked as a trade and investment officer for the British Consulate General Hong Kong, was detained by Chinese authorities after traveling to the mainland city of Shenzhen, on August 8.

Beijing confirmed that Cheng had been held in administrative detention for violating China's Security Administration Punishment Law, which covers a range of offenses deemed too minor to be crimes.

The law is often used as a preliminary measure that allows police to investigate a suspect before deciding whether to prosecute.

Chinese state-owned tabloid the Global Times reported at the time that Cheng had been detained for "solicitation of prostitution." In a statement , Cheng's family said the prostitution allegations were a "joke." In the past, China has been criticized for arresting dissidents and activists on trumped up charges, including sex crimes.

In his Facebook statement Wednesday, Cheng claimed that if he cooperated with officials on the prostitution charge, he was told he would "face a less hard treatment."

Cheng's arrest came during widespread protests in Hong Kong over a bill that would allow extradition to mainland China. While the bill is now withdrawn, the protests -- which remain ongoing -- have grown in intensity in recent months and now include calls for greater democracy.

At the time of his arrest, friends feared that Cheng's detention might in fact have been linked to the protests, noting that he had shared pro-democracy images on social media and had voiced support for the city's ongoing protest movement.

His detention followed reports at the time that Chinese immigration officials were regularly searching travelers' phones and bags as they crossed the border for evidence they had taken part in demonstrations.

Cheng said in the Wednesday statement that he supports and took part in the protests "but did nothing illegal or illegitimate during the events."

He said the British consulate had tasked staff to collect information about the status of protests, which included joining online forums and speaking with protesters.

He said he knew people from the mainland who had been arrested in Hong Kong after taking part in the protests. During his business trip to Shenzhen, Cheng said he collected money from the family of one such protester for his court case.

Allegations of torture

While in detention, Cheng said he was transported in a van to another site, where he was beaten and forced into stress positions, such as holding a squat for hours.

"They beat me every time I failed to do so using something like sharpened batons," Cheng said in the statement.

"I was hung (handcuffed and shackled) on a steep X-Cross doing a spread-eagled pose for hours after hours. I was forced to keep my hands up, so blood cannot be pumped up my arms. It felt extremely painful," he said.

Cheng said that he was deprived of sleep, placed in solitary confinement and forced to sign confessions.

He claimed his interrogators accused him of being a British spy, a mastermind of the protests, and a "British proxy" to incite the unrest.

Cheng alleged police were keen to find out about the inner workings of the protest movement, including how it was organized and key activists involved. He said he was shown photographs and told to write down the names of anyone he knew and their role in the protests.

After 15 days Cheng was released and sent back to Hong Kong but he believed that mainland Chinese authorities could abduct him at any time.

"They clearly stated that if I receive media interviews and speak out anything other than 'soliciting prostitution' publicly, I will be taken back to mainland China from Hong Kong," he said.

Following the ordeal, Cheng said he fled to an undisclosed third country "for security reasons" and is seeking asylum.

He said that he was asked to resign from his position at the consulate this month and had "started negotiations on the solution and severance package with the UK Government."

In his statement, Raab said that the Foreign and Commonwealth Office was working to support Cheng, "including to come to the UK."

"Now my future is still uncertain and insecure," Cheng said. "I won't give up the fight for human rights, peace, freedom and democracy for the rest of my life, no matter the danger, discrimination and retaliation I will face."