It's hard to be a chip company with operations in mainland China, one of the world's largest producers of the semiconductors that power everything from consumer electronics to household appliances. Washington wants to constrain China's chip development while bolstering its own semiconductor industry. Now, one Taiwanese semiconductor firm is pulling out of mainland China's chip sector altogether, blaming the effects of U.S. tech controls.

On Friday, King Yuan Electronics Co. (KYEC), a major player in the testing and packaging segment of the semiconductor supply chain, said it would exit the mainland China market in a Taiwan stock exchange filing. The company said it would dispose its entire 92.16% stake in its mainland China-based subsidiary, King Long Technology (Suzhou), to a consortium of Chinese firms for 4.9 billion yuan ($676.5 million).

AfriPrime Android Web View app on Amazon Adroid app store....  https://rb.gy/3xek46

KYEC, in its filing, said there were "many uncertainties" regarding the operating environment for King Long Technology. In a statement, the company also pointed to the impact of geopolitics on the semiconductor industry and U.S. restrictions on China's semiconductor industry.

The company said it would invest in the proceeds from selling its mainland Chinese operations, totaling $16.6 billion New Taiwan dollars ($509 million), in building new factories and procuring high-end testing technology to meet growing demand in AI and high-performance computing. The Taiwanese company said it would focus on the island's existing chip supply chain, but did not rule out global investments.

KYEC is headquartered in Hsinchu, in northern Taiwan. The city is home to the Hsinchu Industrial Science Park, a key semiconductor manufacturing hub for Taiwan and the global industry. Apart from its headquarters, KYEC also has a presence in Singapore, Japan, and the U.S.

KYEC did not immediately respond to Fortune’s request for comment.

Chip decoupling

KYEC's decision to leave the mainland Chinese market shows how difficult it is for companies in the chip supply chain to navigate a more complicated geopolitical climate. China holds a significant market share in legacy chips, accounting for 31% of mature processes last year according to research from TrendForce.

U.S. export rules bar sales of advanced chips and chipmaking equipment to mainland Chinese companies. Similar rules in Japan and the Netherlands—passed after U.S. lobbying—also control sales to China. And there's a risk the U.S. and its allies could expand rules further. Washington is reportedly lobbying the Netherlands to stop ASML, the Dutch chip equipment maker, from servicing chipmaking tools sold to China.

Separately, U.S. government subsidies for domestic chip manufacturing bar recipients from investing in leading-edge chip manufacturing in China. Grants have gone to both U.S. companies, like Intel and Micron, and non-U.S. companies, like TSMC and Samsung Electronics.

Chip giants like Nvidia, Intel, and ASML have warned about the potential negative impact of U.S. export controls, but for now are still trying to preserve their business in China and work within the new regulations.

Major chipmakers like Taiwan Semiconductor Manufacturing Co (TSMC) and South Korea's Samsung and SK Hynix have production facilities in mainland China. TSMC makes less-advanced legacy chips in mainland China, while Samsung and SK Hynix produce memory chips. All three have received a U.S. waiver to continue their China-based manufacturing.

Export controls are hurting mainland Chinese firms too. Last year, Alibaba paused its plans to spin off its cloud computing division, citing the difficulty of sourcing chips due to U.S. export rules.