An ailing Hong Kong-based bookseller was arrested by Chinese authorities last month for allegedly breaking the law, China's foreign ministry said.

China confirmed Gui Minhai's detention for the first time on Tuesday, after his daughter said Chinese police had arrested him in January while he was travelling to Beijing for medical help, accompanied by two Swedish diplomats.

"Gui Minhai broke Chinese law and has already been subjected to criminal coercive measures in accordance with the law by relevant Chinese authorities," Chinese Foreign Ministry spokesman Geng Shuang told reporters.

Sweden has demanded that Gui, who is a dual Chinese and Swedish citizen, be released and given the opportunity to meet Swedish diplomats and medical staff.

"It is very serious that the Swedish citizen Gui Minhai is still imprisoned in China," Swedish Foreign Minister Margot Wallstrom said in a statement on Monday.

"The brutal intervention in January against a Swedish-support measure was implemented, despite Chinese repeated assurances that Gui Minhai was a free man at the time," Wallstrom added.

"Chinese action was contrary to basic international rules on consular support."

Mysterious disappearance

Rights groups have also urged Gui's immediate release and said that the publisher should be allowed to leave China if he wishes.

"Under Chinese laws, there is no legal justification that prevents Gui from departing," Nicholas Bequelin, Amnesty International's East Asia Regional Director, told Al Jazeera.

Gu had first disappeared while on holiday in Thailand in October 2015.

He was one of five people to have gone missing that year from a Hong Kong bookstore and an affiliated publishing company, which specialises in publications critical of China's ruling Communist Party leaders.

Gui's family suspected he was abducted in Thailand because of his work in Hong Kong, a special administrative region under China.

Three months after his mysterious disappearance, Gui turned up in China, claiming on state media that he voluntarily turned himself in to answer to a drunk-driving incident in 2003, which reportedly resulted in a death of a student.

He was later sentenced to two years in prison and released in October 2017. He was not allowed to leave the country and his movement was reportedly restricted.

Gui's detention and the disappearances of others prompted fears that Chinese authorities have been using tactics that infringe on Hong Kong's legal system.