BANGKOK (AFP) - Allegedly aimed at busting visa abusers and illegal migrants, a Thai police operation called "X-Ray Outlaw Foreigner" has raised questions about racial profiling and fears for asylum-seekers caught in its web.
Tens of millions of tourists come to Thailand each year for the cheap living and postcard-perfect beaches, with some seeking out the seedier thrills of a bustling sex industry.
But as weak law enforcement, porous borders and corruption help make the country a hub for transnational crime, Thai authorities are intensifying Operation X-Ray - a programme that started about a year ago - with more than 1,000 people arrested in recent weeks, most for overstaying their visa.
Although the vast majority caught in the dragnet are migrants from nearby countries, the racial overtones of the campaign have sparked concerns about profiling based on skin colour.
"Our job is to classify who are the good dark-skinned people and who are the ones likely to commit crimes," said immigration bureau chief Surachate Hakparn.
He told AFP that the operation was aimed at weeding out visa overstayers and nabbing criminals - especially "romance scammers" who lure lonely locals online to defraud them of cash.
He insisted that the romance scammers are often Nigerian or Ugandan.
At the start of one night time operation witnessed by AFP in Bangkok's rowdy Nana district earlier this month, about 75 Thai police officers stood in rows at a briefing.
"The suspicious targets are the dark-skinned people," shouted an officer. "First, we search their bodies, then we search their passports." Soon they began stopping suspects, including three people from Mali who were tested for drugs on the spot.
By 11.55pm, almost 30 individuals - about half of whom were black - had been rounded up.
Only one was Caucasian, a Frenchman caught smoking marijuana.
Mr Surachate's staff said details on the breakdown of nationalities was "confidential".
But in the first two weeks of October, police arrested a Korean citizen wanted by Interpol for sexual assault, and busted a team of four Nigerians and 16 Thais allegedly involved in romance scams, according to the authorities.
They also found a Laos national who had overstayed his visa by more than 11 years.
Thailand's reputation as a place to disappear and reinvent yourself, combined with lax visa rules, can be a headache for law enforcement.
The junta that seized power in 2014 justified its power grab by promising stability amid street protests and political upheaval.
But rights groups warn that refugees and asylum seekers who transit through Bangkok en route to a third country for resettlement are also being ensnared in the latest police operation, as they lack legal protections.
According to rough estimates from the non-profit Fortify Rights, there are about 100 adults and 30 children who fit this description, mainly from Pakistan but also from Syria and Somalia.
"Thailand's immigration crackdown has swept up refugees and asylum seekers, sent young children into horrid, prison-like conditions, and appears to have clear aspects of racial profiling against South Asians and Africans," said Mr Brad Adams, Asia director at Human Rights Watch.
Thailand is not a party to the United Nations convention recognising refugees and made headlines in 2015 for deporting more than 100 Uighurs back to China.
More than 70 Pakistani Christians were rounded up and detained this month by police under charges of illegal entry and overstay, even though they were assumed to be in transit and escaping religious persecution in their Muslim-majority homeland.
But the authorities remain unapologetic.
According to immigration chief Surachate's count, Thailand is home to more than 6,000 people who ought to have left the country already.
"In order to clean house, we need to bring in the good people and deport the bad people so that the country will have sustained stability," he said.