BEIJING — A former employee of Britain’s consulate in Hong Kong said on Wednesday that the Chinese secret police tortured and beat him, deprived him of sleep and hung him in a spread-eagled pose for hours as they sought information about what they alleged was foreign interference in the protests that have convulsed the city.

In a statement posted on Facebook, Simon Cheng spoke out publicly for the first time since he was detained in early August at the end of a business trip from Hong Kong to mainland China. When he was released after 15 days, the Chinese authorities said Mr. Cheng had confessed to unlawful activities.

“I deny the arbitrary accusations against me made by the authorities which were obtained through an illegal process, including using torture, threats and coercion,” Mr. Cheng, 29, said in his statement. “I speak out now because the case is relevant to the public interest on knowing the flawed judicial process in mainland China.”

The British foreign secretary, Dominic Raab, said he had summoned the Chinese ambassador in London to express outrage at what he called “the brutal and disgraceful treatment of Simon in violation of China’s international obligations.”