(Reuters) — U.K. Prime Minister Boris Johnson on Tuesday granted China’s Huawei a limited role in Britain’s 5G mobile network, resisting U.S. pressure to exclude the company from next-generation communications over fears China could use it to steal secrets.

In the biggest test of his post-Brexit foreign policy to date, Johnson ruled that “high-risk vendors” would be allowed into the “non-sensitive” parts of 5G networks, but their involvement would be capped at 35%.

They would be excluded from the sensitive core of networks, where data is processed, and banned from all critical networks and sensitive locations such as nuclear sites and military bases, the government said.

The decision will dismay President Donald Trump’s administration, which fears China could use Huawei to steal secrets and has warned that if the U.K. gives Huawei a role the U.S. could scale back intelligence cooperation.

“This is a U.K.-specific solution for U.K.-specific reasons, and the decision deals with the challenges we face right now,” Communications Secretary Nicky Morgan said, following a meeting of the National Security Council chaired by Johnson.

VB TRansform 2020: The AI event for business leaders. San Francisco July 15 - 16

Huawei was not mentioned by name in the British government’s statement, but British cyber security officials said they had always treated the company as a “high risk” vendor.

The White House and U.S. State Department did not immediately respond for a request to comment.

Naturally, Huawei was happy about the decision.

“Huawei is reassured by the U.K. government’s confirmation that we can continue working with our customers to keep the 5G rollout on track,” said Huawei vice president Victor Zhang.

“This evidence-based decision will result in a more advanced, more secure, and more cost-effective telecoms infrastructure that is fit for the future. It gives the U.K. access to world-leading technology and ensures a competitive market.”

Sources told Reuters last week that senior British officials had proposed granting Huawei a limited role in the 5G network — a “calculated compromise” that could be presented to Washington as a tough restriction but also accepted by British operators already using the company’s equipment.

Huawei, the world’s biggest producer of telecoms equipment, says the United States wants it blocked from Britain’s 5G network because no U.S. company can offer the same range of technology at a competitive price.

The U.S. has argued that as 5G technology evolves, the distinction between the “edge” and “core” will blur as data is processed throughout the network, making it difficult to contain any security risks.

Huawei’s equipment is already used by Britain’s biggest telecoms companies, such as BT and Vodafone, but it has been largely deployed at the “edge” of the network and excluded in the “core” where data is processed.