Bangkok, Thailand - For decades, hundreds of thousands of home-weary expats have lived in Bangkok or in the palm-lined beach resorts dotted along the Gulf of Thailand.
Drawn to the country by its tropical weather, laidback hospitality and cut-rate comforts, most have made Thailand their home after completing the correct immigration paperwork.
However, others have easily dodged lax visa enforcement, itself another reason Thailand has remained so attractive.
"There are between half a million and one million foreigners living in Thailand, maybe more. No one actually knows," said George Anderssen, the Swedish CEO of Thaivisa.com, a website used by expats to exchange tips on visas and other topics related to life in Thailand.
But following the coup in late May, the new military government issued warnings that it will soon start to clampdown on immigration offenders, raising fears among many that their expat lifestyle in Thailand could soon come to an abrupt end.
"The crackdown is meant for those foreign visitors who abuse the visa exemption scheme for working illegally in Thailand," according to a recent explanation issued by the Thai Embassy in Canberra, Australia.
The warnings issued in July to foreigners who have overstayed by more than 90 days, states they would be banned from Thailand for between one and ten years, although no start date has been announced. From August 12, visitors arriving at Thai airports may be denied entry if immigration officers suspect they are living in the country on short-term visas, according to another notice.
Although Thailand has warned of similar crackdowns in the past, most have come and gone as quickly as successive Thai governments, amid a cycle of coups and elections in the past decade.
If you can't declare you are a tourist you may not be allowed in.
But recent forced deportations of undocumented migrant workers from neighbouring Myanmar, Cambodia, and Laos, as well as a campaign against grey industries including unlicensed taxis and street vendors, suggests the military government means business, said Rex Baay, an immigration consultant at Siam Legal International.
"This time I think they are kind of serious about visas," he said. "Every day we receive telephone enquiries from desperate people."
Nationals of 48 countries including the UK, US, and Australia have been able to enter the country for up to 30 days with a visa-exemption stamp or 60 days extendable for another 30 days with a visa from a Thai embassy overseas.
By simply leaving and entering Thailand on so-called 'visa runs', many have lived for years in Thai cities including the popular beach resorts of Phuket and Pattaya.
Then, last month, border immigration officials began to deny re-entry to people believed to be exploiting the system, particularly at crossings in the south with Malaysia. Although enforcement has reportedly remained more relaxed on Thailand's eastern border with Cambodia and particularly at northern crossings with Laos, immigration officials have warned that the policy will apply everywhere starting next month.
"If you can't declare you are a tourist you may not be allowed in," said an immigration official in Tak province, which shares a border with Myanmar.
"We urge people to get the right visa," said the official, who requested anonymity because they were not authorised to speak to the media.
Thousands of foreigners living legally in Thailand are able to apply for work visas through their employers, or retirement visas if they are over 50 years old and can prove they have adequate finances. Others, particularly men, can live in the country on marriage visas.
Education visas, which provided a more legitimate long-term option for expats, have become a target of the recent crackdown due to the large numbers of ghost schools in Thailand that provide the necessary paperwork without offering any classes. The military government has reportedly ordered schools across the country to ask for signed declarations from foreign students who must now promise they will attend classes.
For people who fit into none of these categories, question marks remain. A semi-retired UK national in his 40s who asked not to be identified said he has visited Thailand a dozen times since he closed a telecommunications consultancy in Europe two years ago. Although a visa-exemption on arrival worked in the past, he said he is reluctant to fly back to Thailand in case he is refused entry.
"I will not be stranded by the visa crackdown as I have my own home outside of Thailand, but it will force me to change my plans," he said.
He had to cancel plans for a $6,000 medical operation and switch to a hospital in Singapore.
Thailand's travel industry represents 20 percent of the country's total economic output. Thailand's medical tourism industry accounts for about 40 percent of the global market. Anything that restricts the free movement of foreigners into and out of the country is likely to impact Thailand's economy.
Last year, Bangkok was ranked the world's most visited city with nearly 16 million people travelling to the Thai capital, ahead of London and Paris, according to Global Destination Cities Index.
|Cambodian immigrants flee Thailand
But more than six months of protests leading up to the May 22 coup - and the military takeover itself - have reduced the number of arrivals this year.
Ten percent fewer foreigners travelled to Thailand in May compared to the same month in 2013, according to Ministry of Tourism figures.
The visa crackdown expects to depress these figures further: Foreigners living in Thailand illegally on short-term visas have typically marked themselves as tourists on arrival cards, causing artificial inflation of the numbers on tourism data.
How immigration rules will be enforced still isn't clear.
Airlines contacted by Al Jazeera, including the national carrier Thai Airways and budget operators Nok Air and AirAsia, said the government has so far not asked them to vet passengers before they board, raising the possibility some could be turned away after landing.
"The immigration Bureau will be taking the lead on this initiative," said Piyasuda Archasantisuk, a Bangkok-based spokesman for AirAsia. "Our normal procedure is to conduct a basic document check prior to the passenger's departure."
With stricter enforcement not due until later in August, the number of people leaving the country remains low but could increase, said Thaivisa.com's Anderssen. Some have headed to neighbouring Cambodia but most want to stay, he added.
"Many of these people have been in Thailand for years," he said. "For them, there simply is nowhere else."