SEOUL, South Korea — South Korea will stop exchanging classified intelligence on North Korea with Japan amid a bitter trade dispute, Seoul said Thursday in a surprise announcement that is likely to set back U.S. efforts to bolster security cooperation with two of its most important allies in the Asian region.

South Korea's decision to cancel the intelligence-sharing pact will also further aggravate its ties with Japan, which are already at their lowest point since the two countries established diplomatic ties in 1965. Japanese media said Tokyo lodged a protest with Seoul, and quoted unidentified Tokyo officials as calling the South Korean move "extremely regrettable" and "unbelievable."

Many experts had predicted that South Korea would be unlikely to spike the 3-year-old intelligence-sharing deal for the sake of its relations with the United States. South Korea has been seeking U.S. help in resolving the trade dispute, and Seoul and Washington have also been working together to restart stalled talks on stripping North Korea of its nuclear weapons.

South Korea's presidential office said it terminated the intelligence deal because Japan's recent decision to downgrade South Korea's trade status caused a "grave" change in security cooperation between the countries.

"Under this situation, the government has determined that maintaining the agreement, which was signed for the purpose of exchanging sensitive military intelligence on security, does not serve our national interests," Kim You-geun, the deputy director of South Korea's presidential national security office, said in a nationally televised statement.

Tension between South Korea and Japan could hurt US goals in the Pacific — and China is watching Social and economic tensions between the two Asian neighbors could boil over and impact a key intelligence sharing arrangement, endangering America’s long-term strategy in the region.

He said South Korea will formally notify Japan of its decision before Saturday, the deadline for an extension of the pact for another year.

Since early last month, Japan has imposed stricter controls on exports to South Korea of three chemicals essential for manufacturing semiconductors and display screens — key export items for South Korea — and decided to remove South Korea from a list of countries with a preferential trade status.

× Fear of missing out? Sign up for the Early Bird Brief, the defense industry's most comprehensive news and information, straight to your inbox. Thanks for signing up. By giving us your email, you are opting in to the Early Bird Brief.

South Korea accuses Japan of weaponizing trade to punish it over a separate dispute linked to Japan’s brutal colonial rule of the Korean Peninsula from 1910-1945. Japan denies that, saying its steps were taken because of unspecified security concerns.

The Japanese trade curbs triggered an outburst of anti-Japan sentiment in South Korea. Many South Korean citizens rallied in the streets, canceled planned holiday trips to Japan, and launched widespread boycotts of Japanese beer, clothes and other products. The South Korean government, for its part, decided to downgrade Japan’s trade status.

Some experts say the tit-for-tat actions could eventually hurt South Korea’s economy more than Japan’s. Many big South Korean manufacturers including Samsung heavily rely on materials and components imported from Japan, while Japan doesn’t import many vital materials from South Korea.

Liberal South Korean President Moon Jae-in, who earlier declared his country would "never again lose" to Japan, used the Aug. 15 anniversary of Korea's liberation from Japan to extend an olive branch. Moon said Seoul will "gladly join hands" if Tokyo wanted to talk.

Lt. Col. Dave Eastburn, a Pentagon spokesman, encouraged Japan and Korea “to work together to resolve their differences.”

“The Department of Defense expresses our strong concern and disappointment that the Moon Administration has withheld its renewal of the Republic of Korea’s General Security of Military Information Agreement (GSOMIA) with Japan. We strongly believe that the integrity of our mutual defense and security ties must persist despite frictions in other areas of the ROK-Japan relationship. We’ll continue to pursue bilateral and trilateral defense and security cooperation where possible with Japan and the ROK,” he said in an emailed statement.

On Wednesday, the top U.S. envoy on North Korea, Stephen Biegun, told reporters in Seoul that he appreciated what he called “strong and continued cooperation between the U.S., South Korea and Japan.”

The intelligence deal went into effect in 2016, reportedly at the strong urging of the United States, which wants to boost three-day security cooperation to better cope with North Korea’s nuclear threat and a rising China. The United States stations a total of 80,000 troops in the two Asian countries, the core of America’s military presence in the Asia-Pacific region.

Experts said the deal enabled a quicker exchange of information between Seoul and Tokyo; they had previously exchanged intelligence via the United States. In 2012, the countries nearly forged a similar deal, but it was scrapped at the last minute following a vehement backlash in South Korea.

However, it is unclear how effective the deal has been for both countries, especially in regard to intelligence on North Korea, one of the world’s most secretive countries. But there has been a general consensus that South Korea needed information gathered by Japanese satellites and other high-tech systems, while Japan enjoyed signal, voice and human intelligence from South Korea.

South Korea's Defense Ministry said in a statement Thursday that it will try to maintain a "stable and perfect combined security posture" with the United States regardless of the termination of the intelligence deal. It called the South Korean-U.S. alliance "powerful."

South Korean government and ruling party officials have publicly questioned how Seoul could share intelligence with a country that questioned Seoul’s handling of sensitive materials imported from Japan. Without providing concrete evidence, some Japanese officials, including Prime Minister Shinzo Abe, suggested that some critical Japanese materials with potential military applications exported to South Korea may have reached North Korea. Seoul flatly denies that.

The fate of the deal had divided people in South Korea. Some argued that South Korea should do whatever it could to inflict pain on Japan, and that just floating the idea of ending the intelligence deal could force the United States to persuade Japan to lift its trade curbs. But some stressed that the deal’s cancellation would impair relations with the United States at a time when South Korea faces many security challenges, including the stalemate of nuclear talks with North Korea.

Moon’s government has lobbied hard to facilitate talks between the U.S. and North Korea on the nuclear crisis. But the diplomacy has remained largely stalemated for months, and North Korea now says it won’t go through South Korea to talk to the United States. The North recently test-fired a series of short-range missiles and other weapons capable of striking much of South Korea.

Last month, a Russian military plane allegedly violated South Korean airspace in the first such trespassing by a foreign warplane since the end of the 1950-53 Korean War. Russian and Chinese warplanes allegedly also made a highly unusual joint entrance to South Korea's air defense identification zone, in what analysts said was an attempt to see how the Seoul-Washington-Tokyo security cooperation worked.

South Korea’s main conservative opposition party accused the Moon government of confusing “genuine courage” with “foolhardy courage.” The Liberty Korea Party said security coordination with Washington and Tokyo needed to be solidified in the face of strengthening cooperation among Russia, China and North Korea.

"We would have lots of things to lose from the deal's termination," said analyst Go Myong-Hyun of the Seoul-based Asan Institute for Policy Studies. "If the U.S. turned its back on South Korea, we would be completely isolated in Northeast Asia."

On Thursday evening, about 30 anti-Tokyo activists gathered near the Japanese Embassy in Seoul to welcome the intelligence deal’s termination. Jubilant participants held placards that read: “The scrapping of the South Korea-Japan deal is a people’s victory.”