South Korea and the United States said on Friday they will deploy an advanced missile defense system in South Korea to counter a threat from North Korea, drawing sharp and swift protest from neighboring China. The Terminal High Altitude Area Defense (THAAD) anti-missile system will be used only as protection against North Korea's growing nuclear and ballistic missile capabilities, the South's Defense Ministry and the US Defense Department said in a joint statement. Beijing said on Friday it lodged complaints with the US and South Korean ambassadors over the THAAD decision. China said the system would destabilize the security balance in the region without achieving anything to end the North's nuclear program. China is North Korea's main ally but opposes its pursuit of nuclear weapons and backed the latest UN sanctions against Pyongyang in March. "China strongly urges the United States and South Korea to stop the deployment process of the THAAD anti-missile system, not take any steps to complicate the regional situation and do nothing to harm China's strategic security interests," the foreign ministry said in a statement. Selection of a site for the system could come "within weeks" and the allies were working to have it operational by the end of 2017, a South Korean defense ministry official said. The THAAD will be deployed to US Forces Korea, "to protect alliance military forces from North Korea's weapons of mass destruction and ballistic missile threats," the joint statement said. The United States maintains 28,500 troops in South Korea, a legacy of the 1950-53 Korean war. "When the THAAD system is deployed to the Korean Peninsula, it will be focused solely on North Korean nuclear and missile threats and would not be directed toward any third party nations," the statement said. The decision to deploy THAAD is the latest move to squeeze the increasingly isolated North, which also includes a series of bilateral sanctions by Seoul and Washington as well as layers of UN sanctions. South Korea has been reluctant to discuss THAAD openly given the opposition of China, its main trading partner and an increasingly close diplomatic ally. South Korean President Park Geun-hye and her Chinese counterpart Xi Jinping have held seven summit meetings since both took office in 2013. Russia is also opposed to basing a THAAD system in South Korea. Its foreign ministry will take the deployment into account in Moscow's military planning, Interfax news agency quoted it as saying on Friday. China worries the THAAD system's radar will be able to track its own military capabilities. China "knows full well that the THAAD being deployed to South Korea is not aimed at it at all," said Yoo Dong-ryol, who heads the Korea Institute of Liberal Democracy in Seoul. "It just doesn't like more American weapons system being brought in so close to it," he said. Japan's Deputy Chief Cabinet Secretary Koichi Hagiuda said Tokyo "supports the deployment because it bolsters security in the region." Japan has said it is considering another layer of ballistic missile defense, such as THAAD, to complement ship-borne missiles aboard Aegis destroyers in the Sea of Japan and its ground-based Patriot missiles. Built by Lockheed Martin Corp, THAAD is designed to defend against short and medium-range ballistic missiles by intercepting them high in the earth's atmosphere, or outside it. The United States already has a THAAD system in its territory of Guam. Each system costs an estimated $800 million and is likely to add to the cost of maintaining the US military presence in South Korea — an issue in the US presidential campaign. Republican candidate Donald Trump has argued that US allies South Korea and Japan should pay more toward their own defense. A joint South Korea-US working group is determining the best location for deploying THAAD. It has been discussing the feasibility of deployment and potential locations for the THAAD unit since February, after a North Korean rocket launch put an object into space orbit. The launch was condemned by the UN Security Council as a test of a long-range missile in disguise, which North Korea is prohibited from doing under several Security Council resolutions. North Korea rejects the ban, saying it is an infringement on its sovereignty and its right to space exploration. North Korea in late June launched an intermediate range ballistic missile off its east coast in a test that was believed to show some advancement in the weapon's engine system. On Thursday, Pyongyang said it was planning its toughest response to what it called a "declaration of war" by the United States after the US Treasury Department blacklisted leader Kim Jong Un for human rights abuses. Also on Thursday, a US official said the administration of President Barack Obama is asking other nations to cut the employment of North Korean workers as a way to reduce Pyongyang's access to foreign currency.