Science fiction writers have wondered for years what an all-encompassing surveillance state might look like. China decided to build it.

Over the last year, The New York Times has revealed the lengths to which Beijing has gone to identify and control Uighurs, a Muslim minority that has lived for centuries on the country's western frontier. While Chinese state secrecy means we don't know the full extent of the regime's malevolent policies, what has been uncovered should chill every civil libertarian to the bone.

Within Kashgar, a majority Uighur city, residents must line up to be scrutinized before they can move from place to place. They are legally required to travel with ID cards and to swipe them at each checkpoint. They are also required to expose their faces to cameras that feed their pictures to facial recognition software. At the behest of the national government and regional police forces, Chinese software makers are training their algorithms to distinguish Uighurs from Han, China's ruling ethnic majority. Police officers stationed throughout Kashgar need neither probable cause nor a warrant to detain Uighurs and check their phones for the surveillance software that they're legally required to install.

And if a Uighur resident raises a red flag during one of these encounters? He or she will likely be sent to a "re-education" camp where, Human Rights Watch reported last year, Chinese Muslims are "held indefinitely without charge or trial, and can be subject to abuse." The camps may contain tens of thousands, hundreds of thousands, or even millions of Muslims. The lack of government transparency makes it impossible to know even this basic information.

To the extent that China has justified its systematic targeting of a religious and ethnic minority, the government says it wants only to combat Islamic terrorism as part of its "stability maintenance" program. Yet the country's surveillance apparatus has no obvious form of due process, no regard for civil liberties or privacy, and no avenues for appeal.

Perhaps we should not be surprised that China, the most oppressive global superpower since the Soviet Union, is a leader in this race to the bottom. More alarming is that the disease is spreading. Foreign Policy reported in August 2018 that Ecuador is using a "national emergency response and video surveillance system built entirely by Chinese companies and financed by Chinese state loans." The Times reported in April that the country may soon add China's facial recognition software as well.

As this technology improves and gets cheaper, it will likely become affordable to every two-bit dictator on Earth. What happens then is a chilling mystery.