China is forcing tourists to install “text-stealing malware” on their smartphones, according to a new report.

The malware is said to download a visitor’s text messages, calendar entries, phone logs — and even scans for “extremist files”.

The joint investigation by Motherboard, Süddeutsche Zeitung, The Guardian, The New York Times, and Germany’s NDR has found that the use of smartphone surveillance is not limited to the local population, with foreigners crossing into Xinjiang “forced to install a piece of malware on their phones that gives all of their text messages as well as other pieces of data to the authorities”.

According to the investigation, the malware is part of a plot to spy on foreigners crossing into China’s Xinjiang region, where authorities are cracking down on the local Muslim population.

Visitors are forced to install spy software on their phones that gives Chinese officials access to all of their text messages, the report claims.

The malware is installed by a border guard who physically seizes the phone.

Officials also scan the device for specific sets of files, including “Islamic extremist content”, as well as innocuous materials and academic books.

“(This app) provides yet another source of evidence showing how pervasive mass surveillance is being carried out in Xinjiang,” said Maya Wang, China senior researcher at Human Rights Watch.

“We already know that Xinjiang residents — particularly Turkic Muslims — are subjected to around-the-clock and multidimensional surveillance in the region.

“What you’ve found goes beyond that: it suggests that even foreigners are subjected to such mass, and unlawful surveillance.”

According to The Guardian, people using the remote Irkeshtam border crossing into China are “routinely having their phones screened by guards”.

The app was reportedly designed by a Chinese company, and puts the 100 million yearly visitors to Xinjiang at risk of state surveillance.

The Irkeshtam crossing is China’s most westerly border, and is regularly used by tourists and traders.

At the crossing, travellers are made to unlock and hand over their phones, which are taken away to a separate room.

Apple’s high-security iPhones are plugged into a scanner, while Android phones have the snooping app installed.

China has come under increasing international pressure recently over its arbitrary detention of Muslims in concentration camps in the northwest of the country.

It is estimated that one million Uighurs, an ethnic minority in China, are being held in the camps, where they are subjected to torture, overcrowding and a daily regimen of party indoctrination.

Local citizens are also forced to download spyware that restricts what they can access — and reports their usage back to officials.

Police also check mobiles for evidence of foreign social media apps like Twitter or WhatsApp.

One man named Kasim, who claims to be a Xinjiang native, shared what he says are secretly taken pictures inside the secretive region, which the Chinese government restricts access to by outsiders.

He says he used special software to bypass the government’s censors and post the images on Twitter.

And he said living in China is “like Nazi Germany” and likened the Chinese Communist Party to Islamic State.

He said: “If you (have) got Twitter or Facebook in your phone, you will be sentenced to 15 years in concentration camps.”

Kasim told The Sun Online: “China doesn’t want you to know what’s happening outside of China, so they’ve built a firewall.

“Police check your phone looking for Facebook, Twitter, Instagram — any app not made in China.

“If they catch you with any of these apps, or in contact with someone abroad — even someone from China who has now left the country — they accuse you of hating communism, of hating China.

“Almost every police (officer) has handheld equipment they connect to your phone with a USB where they can scan everything on your phone, all your photos, everyone you’ve ever spoken to.

“They transfer everything to their own system, iPhones only take about three minutes to scan — other phones can take hours.”

This article originally appeared on The Sun and was reproduced with permission