Japan and South Korea, two of the US’s closest allies in Asia, are locked in a trade dispute that threatens both crown jewel Samsung Electronics and the global smartphone supply chain.

On July 1, citing national security concerns, Japan placed restrictions on exports to South Korea of three chemical materials crucial for the manufacture of semiconductors and screens used in smartphones and televisions. That poses a huge headache for companies like Samsung, SK Hynix and LG Display, which rely heavily on Japan, the most important source for the chemicals globally. Tokyo’s official statement said that some South Korean companies weren’t properly managing the chemicals, while a Japanese report said some supplies may have ended up with North Korea. Seoul disputes that, and says it has enforced trade restrictions on sensitive materials and on North Korea.

The dispute could escalate next week, when Japan is due to make an announcement on whether it’s removing South Korea from a list of the country’s preferred trading partners, which would require Japanese firms to obtain additional export verifications on hundreds of products before selling them to Korean companies. The US has said it has no plans to mediate between its two allies, vital to its aims of balancing China and addressing the threat from North Korea, and called for them to “sit down and talk.” But bilateral talks have failed to yield progress and yesterday (July 16) Seoul rejected Tokyo’s proposal of third-party arbitration.

In the short term, Japan’s move hasn’t hurt the companies’ share prices—in fact investors are hopeful the spat could reduce the oversupply of chips (paywall) that has been driving down chip prices and earnings for Samsung and others. Since the companies have some inventory of the materials on hand, it could take a few months for the impact on customers of South Korean chips and screens, such as Apple and Huawei, to become clearer.

Japan’s actions parallel US moves to restrict Huawei’s access to its supply chain, by blocking American companies from doing business with the Chinese smartphone and telecom equipment maker in May, also citing national security concerns. That move was relaxed (paywall) after presidents Donald Trump and Xi Jinping met on the sidelines of the G20 summit hosted by Japan, and agreed to restart trade talks to address their tensions.

The roots of this spat, though, are far older than the US-China economic rivalry or security concerns, and the relationship between Korea and Japan is a complex one, weighed down by their 20th century history. South Korea’s rancor relating to the occupation by Japan from 1910-1945, and wartime oppression that included forcing Koreans into prostitution and to work in factories in Japan, remains deep, and many feel Japan hasn’t atoned enough for the past. Those wounds fester in spite of contemporary ties that have seen Korean TV shows, pop stars, and beauty trends become hugely popular in Japan, while Korea sends the most tourists to Japan, after China.

Relations have spiraled downward since a South Korean Supreme Court ruling last year ordering Nippon Steel, Japan’s largest steelmaker, to pay nearly $90,000 to a surviving worker, and to the families of three other Koreans forced into labor during World War II. Other judgments against Japanese companies for forced labor claims have followed, and more cases are in South Korean courts. Tokyo’s stance is that the issue of compensation was addressed with a 1965 treaty that normalized the relationship between the two countries, and saw Japan give hundreds of millions of dollars in aid and loans.

A notice at a Seoul store urges shoppers to boycott Japanese products.

Then, Japan Times, the oldest English-language newspaper in the country, sparked outrage late last year when it announced it would replace the term of “forced labour” with “wartime laborers,” a move that critics say aligns the paper with Japanese prime minister Shinzo Abe’s agenda of reshaping wartime history.

South Korean president Moon Jae-in has described the situation as “an unprecedented emergency,” and though South Korean companies say they are looking for alternate supplies, the two countries’ technology sectors are closely intertwined.

“I am unsure how Korea will be able to replace Japan’s inputs for their finished products,” said Bryan Mercurio, an expert on international trade law at the Chinese University of Hong Kong. “Likewise, I can’t see an easy export replacement for Japanese products, and do not believe domestic companies will be able to absorb all the components.”