Chinese border agents have been installing spyware on phones from tourists who enter the country through certain crossings in the Xinjiang region, an area where China is known to be conducting intensive surveillance of the largely Muslim ethnic minority groups who live there. The spyware was reported today by a group of publications, including The Guardian, Motherboard, The New York Times, and more.

Border agents in the region have been requiring tourists to hand over their phones and passcodes before entering, according to the reports. The agents will then disappear with the phones in order to snoop through them. For iPhones, that reportedly includes plugging them into a machine that scans through the phone’s contents. For Android phones, it goes further, with border agents installing a spyware app that scans the phone and collects data.

The app collects data and scans for the presence of certain files

The app, named BXAQ or Fēng cǎi, collects phone contacts, text messages, call history, calendar entries, what apps are on a phone, and what usernames are used in some apps, then uploads that data to a server, according to the reports. The app also scans the phone for more than 73,000 files. Some of that includes extremist content, like an ISIS publication, but it also includes Quran excerpts and music from a Japanese metal band.

It appears that the app is meant to be deleted once inspection of the phone is finished. But border agents seem to have forgotten to do that on some occasions, leading to the app’s discovery. The group of publications then worked with experts to analyze what the spyware is capable of doing. The practice was noticed recently and was encountered by people crossing into China from Kyrgyzstan.

Reports over the past couple years have detailed China’s startling surveillance of the Xinjiang region, which is home to a number of ethnic minorities, including the Uighurs, a largely Muslim group of about 8 million people. It’s a resource-rich region, and China has feared losing control over it. It’s led to the use of facial recognition systems, apps that facilitate surveillance, and violent internment camps.

Chinese authorities did not respond to the reporting publications’ requests for comment.