Pro tip for countries looking to keep their tourism numbers up: Don't annoy China.

That's the lesson South Korea is learning the hard way. The country suffered a 40% plunge in Chinese visitors last month, according to the Korea Tourism Organization.

Chinese tour groups have been canceling trips because of anger over the deployment of a controversial U.S.-built missile defense system in South Korea. Chinese authorities are believed to have told travel agencies last month to stop selling trips to South Korea.

The outlook is bleak, too. Bookings for stays of four to eight nights by Chinese visitors are down 28% in the second quarter of 2017 compared with a year earlier, according to ForwardKeys, a provider of data on the travel industry.

Related: South Korean company to China: Don't blame us for THAAD missiles

China has vigorously opposed the stationing of the THAAD anti-missile system in South Korea, complaining that it threatens security and fuels tensions in the region. The South Korean government says the system is designed to reduce the threat from North Korean missiles.

South Korean businesses that rely on foreign tourists are feeling the chill. Chinese citizens accounted for eight million of the roughly 17 million people who visited South Korea last year and are big spenders.

"There's been a big reduction in the number of groups of Chinese tourists in Seoul since the THAAD missile crisis," said Kil Ki-yon, the director of Seoul Tiger Bus, a company that takes Chinese visitors on tours of the city.

Related: South Korea's economy difficulties

South Korean conglomerate Lotte said its duty free stores have taken a huge hit, too.

Sales to Chinese customers between mid-March and mid-April plunged 40% from a year earlier, according to a spokesman for the group. Chinese tourists tend to account for as much as 80% of duty free sales, he added.

The difficulties come at a time when outbound travel by China's burgeoning middle class is surging. The Chinese spent $261 billion traveling abroad last year, according to the World Tourism Organization, a 12% increase compared with the previous year.

ForwardKeys said Southeast Asian countries are the most likely to benefit from South Korea's problems with China.

Related: Parts of controversial US anti-missile system moved to South Korean site

The tensions between Beijing and Seoul over THAAD show little sign of easing. South Korea is pushing ahead with the system, parts of which have now arrived at the planned deployment site, the South Korean Defense Ministry said Wednesday.

In response, the Chinese Foreign Ministry reiterated its opposition, warning that "China will firmly take necessary measures to safeguard its own interests."

-- Sol Han, Hyunsoo Woo and Steven Jiang contributed to this report.