The takeover of Britain's largest microchip plant by a Chinese-owned company must be reversed, the UK government has said.
Newport Wafer Fab was acquired by Dutch-based technology company Nexperia, a subsidiary of Shanghai listed Wingtech, in July 2021.
However, Nexperia must now sell 86% of its stake "to mitigate the risk national security" following a review.
The firm said it was "shocked" and would appeal against the decision.
The technology made at the plant allows electricity to flow through devices and are the fundamental components of everything from smartphones to the vast data centres powering the internet and are found in millions of products.
The Wafer Fab deal came under scrutiny amid an ongoing global shortage of computer chips which has been exacerbated by the pandemic and severely hit a wide range of industries.
At the time of the takeover, the Newport plant was producing about 35,000 wafers a year.
The UK government had faced pressure to intervene, not least from the Commons Foreign Affairs Committee, which said that Nexperia's takeover represents the sale of "one of the UK's prized assets" to a strategic competitor and potentially compromised national security.
In its decision, the UK government said the takeover of Newport Wafer Fab created two risks to national security.
The first related to Nexperia's development of the Newport site, which the government said could "undermine UK capabilities" in producing compound semiconductors.
The second, the plant's location as part of a semiconductor cluster on the Duffryn industrial estate, could "facilitate access to technological expertise and know-how".
It said the close links that existed in Newport "may prevent the cluster being engaged in future projects relevant to national security".
A report in April said an investigation pledged by then-Prime Minister Boris Johnson by the National Security Advisor had not happened.
However, the decision was called in by the then-Business Secretary Kwasi Kwarteng in May on national security grounds.
It was left to his successor Grant Shapps to make the decision following delays due to the changes in prime minister and the cabinet.
Nexperia said it did not accept the national security concerns and criticised the UK government for not entering "meaningful dialogue".
Toni Versluijs, head of its UK operations, said: "We are genuinely shocked. The decision is wrong, and we will appeal to overturn this divestment order to protect the over 500 jobs at Newport.
"The decision is disproportionate given the remedies Nexperia has proposed. It is wrong for the employees, for the UK semiconductor industry, for the UK economy and for the UK taxpayer - who could now be faced with a bill of over £100m for the fallout from this decision.
"We rescued an investment-starved company from collapse. We have repaid taxpayer loans, secured jobs, wages, bonuses and pensions and agreed to spend more than £80m on equipment upgrades. The deal was publicly welcomed by the Welsh government."
A government spokesman said: "The UK has a number of strengths within the semiconductor sector, including in south Wales, and through our forthcoming semiconductor strategy we will enable this technology to continue to support the UK and global economy."
The Welsh government said the UK government's decision had provided some "welcome clarity".
"Our immediate priority now is to safeguard the future of the hundreds of highly skilled jobs in Newport," it added.