Apple removed gambling apps from the App Store in China, reportedly some 25,000 titles, after coming under fire from the country’s media for not making enough of an effort to filter illegal content.

“Gambling apps are illegal and not allowed on the App Store in China. We have already removed many apps and developers for trying to distribute illegal gambling apps on our App Store, and we are vigilant in our efforts to find these and stop them from being on the App Store,” the tech giant said in a statement.

State broadcaster CCTV reported Apple allowed gambling apps masquerading under the guise of official lottery apps onto its store. The news channel noted users who have already downloaded the apps can continue to use them.

Apple offers more than 1.8 million apps in China, Ministry of Industry and Information Technology (MIIT) statistics show.

The Wall Street Journal reported Apple’s move comes at a time when there is a “growing trade friction” and that the company needs to maintain strong links to China, which accounts for about one-fifth of its revenue and where many iPhones are assembled.

In May, apps using Apple’s software development kit to integrate calling services were banned in China as part of new MIIT regulations.