Hong Kong has defended its bookseller Lam Wing-kee's right to stay in the country and offered him protection from being sent back to China. Its security chief has said that there is "no legal way" to return Lam to China, where he was detained without a lawyer for eight months.

Hong Kong's decision to support Lam comes a day after Beijing accused the bookseller of violating his bail terms. According to Hong Kong's Ming Pao newspaper, China also warned that Lam could face strong legal action over his failure to adhere to rules and return to the mainland after he was allowed to travel to Hong Kong in June.

"There is no legal arrangement for the transfer of a person to the mainland authorities and the Hong Kong government will handle all cases in accordance with the law of Hong Kong," Hong Kong's secretary for security, Lai Tung-kwok told reporters.

Lai met officials in Beijing to discuss the detention of five booksellers in the mainland who went missing last year and surfaced in Chinese custody.

Hong Kong has also vowed to provide security to Lam after he expressed fears for his safety, saying he is being followed by strangers. Officials later confirmed that it was a media person who followed Lam, Reuters reported.

Lam and other detainees were reportedly made to confess to the Chinese of "illegal trading". Some of them were captured by the border control when they were trying to bring banned books into the mainland. The books are legal in Hong Kong where they were published but banned in China as they criticise communist regime and its leaders including President Xi Jingpin.

Although Hong Kong is a semi-autonomous region, it also has the status of a special administrative region of China. But both have separate legal systems governing them under an agreement signed in 1997, when the British returned Hong Kong to China.

However, Hong Kong has long been locking horns with China since its pro-democracy protests in September 2014. Following Lam's revelation about his detention, dozens of people took to the streets in Hong Kong to protest against China for trying to muzzle the freedom of speech.

Released Hong Kong Bookseller Lam Wing Kee
Lam Wing Kee attends a protest after his release from detentionGetty