BEIJING—China confirmed it was holding Swedish citizen Gui Minhai and that he would be dealt with according to Chinese law, as Stockholm stepped up criticism of Beijing for its “brutal” treatment of the Hong Kong bookseller.

Mr. Gui was snatched from a train in northeast China by plainclothes agents while traveling with Swedish diplomats late last month, according to people briefed on the case. It was a twist in a saga that began in 2015, when Mr. Gui disappeared from a vacation home in Thailand under unclear circumstances and reappeared in Chinese custody to face an old drunken-driving charge. He was released in October but forbidden to leave the country.

Mr. Gui was one of a number of Hong Kong-based booksellers who starting in 2015 vanished and reappeared in Chinese custody. The booksellers’ publications dealt with the kind of political gossip banned across the border in mainland China, often involving salacious material on Chinese leaders. Chinese Foreign Ministry spokesman Geng Shuang said Tuesday during a regular news briefing that Mr. Gui had violated Chinese law and was “subject to criminal coercive measures.”

Under Chinese law, a person who obtains a foreign passport is no longer a Chinese citizen. Nonetheless, the situation of Mr. Gui, who was born in China and received Swedish citizenship in 1996, is a reminder of how authorities tend to treat detained China-born foreign passport holders as if they were still Chinese citizens.

Sweden has repeatedly called for Mr. Gui’s release. Mr. Geng’s comments Tuesday came after Swedish Foreign Minister Margot Wallström described Mr. Gui’s removal from the train as a “brutal intervention” that had been conducted despite repeated assurances that he was a free man at the time.