Chinese President Xi Jinping congratulated new South Korean leader Moon Jae-in on Wednesday amid soaring tensions on the Korean Peninsula, saying Beijing is willing to work with Seoul to "properly handle differences."

Xi's message to Moon comes as China and South Korea have seen their once-flowering ties wither after Seoul's decision to install a U.S.-made anti-missile system in the country as a means of countering a possible North Korean attack.

The Terminal High Altitude Area Defense (THAAD) system's deployment has angered Beijing, which sees it as threat to national security because the system's radar is powerful enough to peer into China's northeast — potentially to monitor flights and missile launches.