South Korea considered ending a visa waiver for Thais that has been in effect since 1981 because of the current influx of refugees and illegal immigrants, a government source said Wednesday.

Back in June, when xenophobia reached fever pitch due to the arrival of dozens of Yemeni refugees on Jeju Island, the Justice Ministry considered suspending or canceling the visa waiver for some nationals who are prone to outstaying their welcome.

Thais topped the list since they make up an estimated 100,000 of about 310,000 illegal immigrants in South Korea.

Under the waiver, Thai tourists can stay here for 90 days without a visa. Last year, 498,511 Thais came to the country, the largest number among visitors from Southeast Asia and sixth after China, Japan, Taiwan, the U.S. and Hong Kong.

An estimated 65,000 Thais have stayed beyond the 90-day limit, according to Statistics Korea. The ministry believes many of them take illegal jobs in bars and massage parlors.

But the Justice Ministry relented in the face of opposition from the Foreign Ministry, which argued that Thailand is a major partner in South Korea's foreign policy and a main stopover on the escape route of North Korean defectors.

If Seoul unilaterally suspended the reciprocal visa waiver, this could have caused a diplomatic dispute with Thailand, a major destination for 1.71 million South Korean tourists last year.

