The Chinese government warned local tech companies to tighten the privacy protections of 41 apps which allegedly collected personal information without users’ permission, Reuters reported.

China’s Ministry of Industry and Information Technology (MIIT) ordered the companies, which included Tencent, Xiaomi and Sina Weibo, to make improvements to the apps by the end of the year or face prosecution.

Tencent’s messaging app QQ, the second-largest in China after WeChat, made it difficult for users to deactivate accounts and forced them to authorise access to a broad range of personal data, MIIT said.

About 100 companies were told to update the privacy terms of the apps, with more than 8,000 apps already in compliance, the news agency wrote.

The move is part of a broader crackdown to improve digital privacy protections in the country, with the MIIT in November announcing a two-month campaign against mobile apps illegally accessing users’ personal data.