The personal details of thousands of foreign nationals living in southern Thailand were briefly leaked online in what the site's developer admitted Monday was a data breach during a test for police.
The leak comes as the junta-ruled nation pushes ahead with a much publicised crackdown against foreign visa overstayers and criminals, with immigration police adopting the official slogan "Good guys in, bad guys out."
The gaffe was spotted by social media users late Sunday when a database appeared online containing the names, addresses, professions and passport numbers of more than 2,000 foreigners living in Thailand's southern provinces.
The website carried an immigration police seal but used a private Thai web address, not one usually associated with government sites.
It was taken down early Monday, but not before the site's existence had gone viral.
Thai Netizens, a digital advocacy group, tracked down the website's owner, a developer called Akram Aleeming, who later posted a statement on Facebook saying the site had mistakenly been made public during testing stages.
Akram confirmed the error to AFP and said immigration police had commissioned the website.
"We were doing a demo," he told AFP. "As people were concerned it might affect security we closed it (the website)."
Immigration police did not respond to requests for comment.
Away from its booming tourist sector, Thailand has lurched towards a mistrust of foreigners under junta rule, with generals routinely blaming outsiders for a range of ills including crime and stoking political unrest.