Chinese police said Saturday an employee at the British consulate in Hong Kong who was detained on the mainland has been released.

Public security authorities in Shenzhen said Simon Cheng Man-kit was released as scheduled after 15 days of administrative detention.

The Luohu public security bureau in Shenzhen, the mainland city neighbouring Hong Kong, made the announcement on its Weibo microblog account.

Cheng was detained for violating mainland Chinese law and "confessed to his illegal acts," the statement said, without providing further details.

A Hong Kong police officer, speaking on condition of anonymity because he wasn't authorized to discuss the case, confirmed that Cheng had returned to the city, but did not provided further details.

"Simon is released. Simon is safe," said Max Chung, organizer of a rally earlier this week to urge the British government to step up efforts to free Cheng. "We've just managed to talk to him over the phone," he said, adding that Cheng would answer any further questions but did not say when.

Cheng's detention stoked tensions in semi-autonomous Hong Kong, which has been rocked by months of anti-government protests. Cheng, a Scottish government trade and investment officer, was hired locally and did not have a diplomatic passport. He was detained after he left for a business trip on the mainland at a Hong Kong high-speed train station.

The Chinese government has said he was detained for violating public order regulations. The Global Times, a Communist Party-owned nationalistic tabloid, said Thursday he was detained for "soliciting prostitutes." China often uses public order charges against political targets and has sometimes used the charge of soliciting prostitution.

The British consulate did not respond to a request for comment.