Britain will allow Huawei to supply equipment for its next-generation wireless networks such as 5G — despite warnings from the United States — but will exclude the Chinese tech giant from "sensitive parts."

Its decision, the first by a major US ally in Europe, comes despite threats from Washington that it will end intelligence cooperation with the UK if Huawei was given access.

Republicans slammed the decision as "dangerous" and "a mistake that will have significant consequences."

Britain said it would introduce a 35% cap for so-called high-risk vendors and exclude access from "safety-critical networks" and "sensitive geographic locations, such as nuclear sites and military bases."

"The government is certain that these measures ... will allow us to mitigate the potential risk posed by the supply chain and to combat the range of threats, whether cyber criminals, or state sponsored attacks," said media and cyber-security minister, Nicky Morgan.

The timing is awkward for Prime Minister Boris Johnson, coming at the moment it really needs Trump's administration to quickly strike a trade deal after Brexit.

Huawei has come under scrutiny because of worries that communist leaders in Beijing could, under China's 2017 national intelligence law, compel the company to carry out cyber espionage.

RELATED: Will 2020 be the year of 5G technology?

Europe and Huawei

Across Europe — Huawei's biggest market outside China — no government has yet imposed an outright ban on the firm, and attitudes vary.

The European Commission is set to release non-binding guidelines for 5G on Wednesday.

In Germany, politicians are challenging Chancellor Angela Merkel’s position that access for Huawei is not a problem as long as the level of access remains consistent across the continent.

Orange does not use Huawei technology in France, where it is the domestic market leader, but it does rely on Huawei in Spain and Poland.

In Britain, Huawei's supporters say the firm brings expertise and that security issues can be managed. The company denies it would give data access to the Chinese government.

What is the reaction to UK decision on Huawei and 5G?

A senior Trump administration official told the AP that Washington was disappointed by the British decision, adding that the Trump administration would see a “way forward” that leads to the exclusion of “untrusted vendor components” from 5G networks.

Elise Stefanik, a pro-Trump Republican member of the House of Representatives, said Johnson's decision was "wrong, dangerous, and a grave shortsighted mistake."

"Congress must work on a bipartisan basis to push back on this decision by the UK to open their arms to China’s surveillance state," she tweeted.

Florida's Republican Senator Rick Scott said the decision was "a mistake that will have significant consequences."

Nigel Farage, leader of Britain's Brexit Party and a Trump supporter, called it a "terrible decision."

"This is bad for national security, an insult to our closest friends and a sign that our establishment have been paid off by China," he said.

What is 5G?

5G — the fifth generation of cellular networks — is not merely an upgrade from existing 4G wireless network technology, but is billed as a radical transformation delivering ultrafast download speeds.

5G will be built into thousands of new devices, such as thermostats and sensors in medical devices. The aim is for 5G to be instrumental for self-driving cars or for telemedicine, allowing doctors to control robots in remote surgery on patients thousands of miles away. Underpinning all this new connectivity will be a lot more software that can lead to more vulnerabilities.

Banning Huawei puts Britain at risk of falling behind economically, they say. Complicating matters, some British wireless carriers have already started installing Huawei 5G gear and don't want to spend more money ripping it out.

Ciaran Martin, chief executive of the UK National Cyber-Security Centre, insisted the restrictions would "ensure that the UK has a very strong, practical and technically sound framework for digital security in the years ahead."

He added: “High-risk vendors have never been – and never will be – in our most sensitive networks. Taken together, these measures add up to a very strong framework for digital security.”