A British consulate employee detained in China has returned to Hong Kong, his family said Saturday.

Hong Kong: A British consulate employee detained in China has returned to Hong Kong, his family said Saturday.

Simon Cheng disappeared after visiting the neighbouring city of Shenzhen on 8 August and was placed in administrative detention by police.

"Simon has returned to Hong Kong," his family said in a Facebook post, adding he would take "some time to rest and recover".

Cheng was returning to Hong Kong via high-speed train on 8 August and sent messages to his girlfriend as he was about to go through customs.

But he vanished without contact for several days before Beijing confirmed he had been taken into custody by police in Shenzhen for breaking a public security law.

In a statement posted on the Twitter-like Weibo, Shenzhen police said he was "punished with administrative detention for 15 days... for violating the law of the People's Republic of China on public safety management."

Cheng was released on Saturday as the term had expired, the police said, adding he had "confessed to the facts of his illegal activity", but without saying what he was accused of.

The incident came as relations between Britain and China have become strained over what Beijing calls London's "interference" in pro-democracy protests that have wracked Hong Kong for three months.

While in detention Chinese-state media published lurid allegations about Cheng and the possible reason for his detention.

The Global Times, a tabloid state-run newspaper, said he had been detained for "soliciting prostitutes", citing police in Shenzhen.

In an editorial on Friday, the tabloid said it was at Cheng's request that police did not contact his family and that "thanks to the British foreign ministry and media, which have been hyping it, the case is now fully exposed."

But a Facebook page run by Cheng's family dismissed the report of solicitation.

"This is a made-up crime of soliciting prostitution, everyone should see it's a joke," the comment said.

China promised to respect the freedoms in the semi-autonomous territory of Hong Kong after its handover from Britain in 1997, including freedom of speech, unfettered access to the internet and an independent judiciary.

But the protesters who have tipped the city into an unprecedented political crisis say these rights are being chipped away.

Chinese authorities have increased their inspections at the border since the protests, including checking the phones and devices of some passengers for photos of the demonstrations.

Beijing has faced criticism in the past for detaining foreign nationals amid ongoing diplomatic spats, and for accusing dissidents or activists of sex crimes.

In one of the latest protests in Hong Kong, thousands of people held hands Friday in a recreation of the "Baltic Way" human chain demonstration against Soviet rule three decades ago.

The city's skyscraper-studded harbourfront, as well as several busy shopping districts, were lined with peaceful protesters, many wearing surgical masks to hide their identity and holding Hong Kong flags or mobile phones with lights shining.

Activists even scaled the famous Lion Rock mountain which overlooks the city for a night-time protest illuminated by mobile phones.