A decade ago, in 2009, the Swedish phone giant Teliasonera set out to build one of the world’s first fourth-generation wireless networks in some of Scandinavia’s most important—and technologically savviest—cities. For Oslo, Norway, Teliasonera made an audacious and unexpected choice of who would build it: Huawei, a Chinese company with little presence outside China and some other developing markets.

The same year, Huawei landed an even bigger and more unexpected contract to completely rebuild and replace Norway’s mobile phone network, which had first been built by the global standard-bearers: Ericsson of Sweden and Nokia of Finland. The Chinese upstart eventually completed the world’s most ambitious network swap ahead of schedule and under budget.

To many in the wireless industry, it was a coming-of-age moment for Huawei, and for China. Huawei was no longer just another Chinese catch-up clawing out market share thanks to cut-rate pricing or thriving on stolen intellectual property. Suddenly it had cutting-edge technology of its own and was elbowing aside established European giants like Ericsson and Nokia in their own backyard.

“For the first time, people realized Huawei was not just the cheap option but could compete on quality and price,” said Dexter Thillien, a telecommunications analyst at Fitch Solutions.

Fast-forward to now. In less than a decade, allegedly thanks in part to billions of dollars in support from the Chinese government, the privately held Huawei has become the world’s largest telecom equipment company, last year posting more than $107 billion in revenue from operations in some 170 countries.

More important, Huawei has, by most accounts, taken the lead in the race to develop one of the modern world’s most important technologies: fifth-generation mobile telephony. Unlike its various predecessors, which simply offered consumers the ability to send texts, then to surf the web on their phones, and finally to stream video, 5G promises to revolutionize the entire global economy.

And for perhaps the first time in China’s modern history, Huawei’s growing market share and technological prowess are putting a champion of the Chinese government in a position to dominate a next-generation technology. 5G will offer hugely faster data speeds than today’s mobile technology, which is important for consumers. But 5G will also be the technology that ensures artificial intelligence functions seamlessly, that driverless cars don’t crash, that machines in automated factories can communicate flawlessly in real time around the world, and that nearly every device on earth will be wired together.

5G will be, simply put, the central nervous system of the 21st-century economy.5G will be, simply put, the central nervous system of the 21st-century economy—and if Huawei continues its rise, then Beijing, not Washington, could be best placed to dominate it.

Huawei’s startling ability to gatecrash what has been until now an exclusive bastion of the developed world has sent shock waves not only through the industry but also through Western capitals. Its success has turned Huawei into a target for the U.S. President Donald Trump’s administration—which is warning that the company’s growing role in global telecommunications networks could enable Beijing to use its control of the world’s digital plumbing to spy on rival nations or steal their commercial secrets.

“5G is turning more into a geopolitical battleground between the United States and China,” said Tim Ruhlig of the Swedish Institute of International Affairs, who researches 5G technologies.

And that raises a key question that remains unanswered: Who is Huawei really working for? While it prides itself on being a private company, Huawei was founded in 1987 by Ren Zhengfei, a veteran of the People’s Liberation Army’s engineering corps, and the Chinese army was an early and crucial customer for the fledgling firm.

Late last month, a critical report by Britain’s 5G watchdog also raised fears that Huawei might prove to be a high-tech Trojan horse. The report concluded that “underlying defects” left the company’s software and cybersecurity systems open to hackers, posing “significant” security issues. Even so, the report mainly blamed sloppy engineering and found no evidence that the vulnerabilities had been introduced at the direction of Chinese authorities; it also stopped short of proposing an outright ban.

Indeed the Trump administration—which has more often than not managed to alienate its longtime allies—is already faltering in its global campaign to isolate Huawei. While a few U.S. allies, such as Australia and Japan, have followed Washington’s lead and already banned Huawei technology, many others are still considering it. The United Kingdom, like Germany, is still weighing the geopolitical implications of purchasing Huawei equipment. Others such as Thailand and South Korea are pressing ahead and letting Huawei launch 5G projects. India, which the United States hopes to use as a counterweight to China, is resisting American calls to exclude Huawei from its networks.

And behind all these fresh worries over Huawei’s seemingly sudden dominance is a simpler question: How did a modest, private Chinese firm that started out three decades ago importing basic telecoms equipment emerge as the arbiter of what is arguably one of the world’s most important technologies?

There’s no single explanation that accounts for Huawei’s success or recent technical prowess. A cost advantage helped, of course. So did state backing, government protection from foreign competitors, and a huge local market, which led to massive and swiftly multiplying revenues. And it could hardly have been mere coincidence that Huawei’s founder, Ren, was a PLA veteran, and Huawei’s first customer proved to be the People’s Liberation Army.

In the end, however, Huawei’s meteoric rise was the result of a broad mix of different policies and decisions—helped along by a few missteps from its Western rivals.

One theme is clear: Throughout its history, Huawei appears to have benefited from state support not available to the company’s Western rivals, though the exact nature of that aid is difficult to quantify, as is the broader relationship of any private Chinese firm to the government.

Because the company is privately held through a complex employee ownership scheme, it doesn’t have the obligation to publish detailed financial reports as publicly listed firms do. But European investigators have found evidence that Huawei may have received a massive $30 billion line of credit from the China Development Bank, among other well-timed financing.

“State-backed finance was crucial in Huawei’s growth.” “State-backed finance was crucial in Huawei’s growth,” said Matthew Schrader, a China analyst at the Alliance for Securing Democracy at the German Marshall Fund. It helped Huawei sew up the domestic market, which in turn enabled it to expand overseas by offering deep discounts.

Huawei denies receiving direct state aid. Nonetheless, Ren has been upfront about the importance of Chinese industrial policy as key to the company’s growth. Without Beijing’s policy of protecting Chinese companies from aggressive foreign competition at home, “Huawei would no longer exist,” Ren has said.

Huawei’s rise might thus be seen as the latest test in the struggle between two forms of capitalism: open, privatized Western markets versus state-assisted, Chinese-style ones, though this time with an ideological twist, as Huawei is not officially a state company.

Whatever the Chinese government’s role, Huawei was clearly shaped by Ren’s personal vision and ambition. After leaving the army at the age of 39 and working for a state-owned company, Shenzhen Electronics Corp., for four years, Ren secured an $8.5 million loan from a state bank and started Huawei on his own with 14 staffers, the Far Eastern Economic Review reported in a 2000 profile of the company.

He began as an importer of telecommunications switches, a basic networking technology. In 1990, the company started work on its first switch—but rather than partner with a foreign company, which was standard practice in the Chinese telecommunications industry at the time, Ren made massive investments in his company’s research and development wing to build his own products. In the early 1990s, the company is reported to have had 500 research and development staff and 200 working in production—a lopsided ratio—according to an examination of the company’s business history by the analyst Nathaniel Ahrens.

By 1993, the company released the new switch and picked up the army as a client, providing it with its own telecom network. That contract gave the company an important boost over its rivals, according to the Far Eastern Economic Review. A year later, Ren managed to secure another form of protection from the state. He met with Jiang Zemin, the Communist Party general secretary, and told him that a country without a domestic telecoms switch industry was like a country without a military. “Well said,” Jiang replied, according to Ren’s account of the meeting.

By 1996, under Ren’s prodding, the Chinese government shifted its industrial policy to favor domestic telecommunications companies, keeping foreign competitors out.

In subsequent years, a freed-up Huawei embarked on a ruthless campaign of domestic expansion, signing up local government clients, often in rural areas. The company sold its technology at rock-bottom prices to eliminate its rivals and sometimes even offered its services to government entities for free. By 1998, the company had matched the market share of its principal rival, Shanghai Bell, a foreign joint venture.

Throughout its rise to domestic dominance, Huawei has also thrived in international markets by offering its products at a significant discount compared to its competitors. Access to a huge pool of engineering talent willing to work for lower wages than Huawei’s Western competitors translates into discounts of up to 20 percent for customers. Today, Huawei controls 29 percent of the global telecom equipment market. In the Asia-Pacific region that figure is 43 percent, and in Latin America it’s 34 percent, according to figures provided by the Dell’Oro Group, a market research firm.

And while Huawei’s history has been marred by several cases of technology theft—such as an infamous instance in the early 2000s of stealing Cisco code for router software—experts credit Ren with building Huawei into a research and development powerhouse from the company’s first days.

“I think “A lot of their technical expertise as of late is because they have a lot of smart people.” a lot of their technical expertise as of late is because they have a lot of smart people,” said Mike Thelander, an industry analyst and the founder of the Signals Research Group. “You can say a lot of bad things about Huawei, but you don’t throw the baby out with the bathwater.”

Today, Ren says that being a privately held company gives Huawei the freedom to plow more money back into R&D—some $15 billion to $20 billion per year. Some 80,000 people, or nearly half Huawei’s workforce, are dedicated to research and development; tens of thousands alone work at Huawei’s huge corporate campus in Shenzhen.

And in its focus on turning research into marketable products, Huawei compares favorably to Cisco and Google, said Henning Schulzrinne, the former chief technologist at the U.S. Federal Communications Commission. The company’s research organization “is well integrated into the development process,” allowing Huawei to quickly turn research findings into sales, Schulzrinne said.

Huawei is also vertically integrated. Unlike its principal competitors, Sweden’s Ericsson and Finland’s Nokia, Huawei designs nearly every component of 5G technology, including the defining technology of the internet economy: the smartphone. The company is the second-largest maker of smartphones in the world, behind South Korea’s Samsung. By designing chipsets and the handsets they talk to, experts argue, Huawei may have an edge in getting 5G products to market more quickly.

When 3G and 4G networks were being built, Huawei was playing catch-up to its established rivals, licensing much of their technology. To some extent, that lured Ericsson and Nokia, which today are Huawei’s main rivals in the race to develop 5G, into a state of complacency, said Thillien of Fitch Solutions. They had invested a lot of money into what were then cutting-edge technologies and sought to squeeze the most they could out of them rather than racing ahead to the next stage, making their own developments obsolete. At the same time, they felt they had little to fear from what was then regarded as a nonthreatening Chinese firm.

Now, the situation is reversed. Huawei has more 5G-related patents than any other firm, according to IPlytics, a German-based company that tracks intellectual property development. That means other companies will have to pay Huawei to use key bits of 5G technology.

Partly as a result of that technological arsenal, Huawei has been able to shape the rules of the road for 5G in a way it never could with earlier mobile technologies.Huawei has been able to shape the rules of the road for 5G in a way it never could with earlier mobile technologies. Over the past few years, telecoms engineers have regularly gathered every few months to hash out the evolving technical standards that will govern all aspects of 5G. And Huawei has simply flooded the zone, sending more engineers to those meetings than any other telecoms company and making more technical contributions to the still-evolving standard than anyone else, IPlytics found.

Along the way, Huawei has notched an ever-growing tally of technical breakthroughs that no other single company has matched. It has field-tested its 5G technology in lower frequencies (good for coverage) and higher frequencies (better for high data speeds). Earlier this year, it debuted its own, in-house-designed chipset and devices that will make 5G a reality. Huawei says it currently has 30 contracts to build 5G networks around the world, with dozens of other countries close to signing on.

With a Chinese company building the network through which huge volumes of data—phone calls, emails, and business transactions—will flow across the globe, U.S. officials fear that infrastructure could be subverted for espionage, allowing Beijing’s intelligence agencies to gather huge volumes of communications.

Even more dire, Washington fears that Beijing will replace it as the world’s premier intelligence power and perhaps even deny it access to the networks that make global commerce and the projection of military power possible. For decades, U.S. intelligence agencies have capitalized on the central role of U.S. companies in global telecommunications networks to spy on adversaries and gather crucial intelligence.

And now, whether by design or luck or some combination of the two, the Chinese Communist Party may have the means to overturn that disadvantage—especially because the United States itself, despite the prominence of Silicon Valley, doesn’t have a national champion of its own developing 5G. Consolidation and mergers in the telecommunications industry have made European, not American, companies the leading Western makers of the boxes, antennas, and beam-generating equipment that will serve as the backbone of 5G technology.

“If you’re the government of China, you have a couple of choices: You can duplicate what the U.S. did and build a multibillion-dollar signals intelligence network, or you can fund Huawei—and that’s a lot cheaper,” said James Lewis, the director of the Technology Policy Program at the Center for Strategic and International Studies.

Foreign production of advanced communication networks “will challenge U.S. competitiveness and data security,” and as American data increasingly flows across those networks, that will increase “the risk of foreign access and denial of service,” Dan Coats, the director of national intelligence, warned in his annual assessment of threats facing the United States.

As a result of these fears, Washington has essentially banned Huawei equipment inside the United States. Last December, the Justice Department also ordered the arrest of Meng Wanzhou, Huawei’s chief financial officer and Ren’s daughter, on charges of trying to steal American technology and lying about the company’s business in Iran. She is currently fighting extradition to the United States from Canada.

But Washington may be fighting a losing battle in frantically trying to get its Western allies to swear off Huawei as well. So dominant has Huawei already become in building telecom networks globally and vying to set the world standard for 5G that the Trump administration finds itself somewhat isolated, even among its closest allies.

Despite U.S. pressure, the European Union has opted against barring the Chinese firm, and even close U.S. allies such as Britain and Germany, which are still deciding which companies will participate in building their 5G networks, are unlikely to ban Huawei altogether. The reason is simple: For many European countries that already use Huawei equipment in their 4G networks, it would be costly to switch horses in midstream.

U.S. policymakers have leaned especially hard on Germany, even warning Berlin it could lose access to U.S. intelligence sharing if it includes Huawei in its network.

“Europe is very much a battleground, and Germany is a battleground within the battleground.” “Europe is very much a battleground, and Germany is a battleground within the battleground,” said Thillien of Fitch Solutions.

Yet the Trump administration has done a poor job, by most accounts, of convincing European allies of the security risk posed by the company—a problem exacerbated by the president’s constant sniping at his counterparts across the Atlantic. Washington has never publicly presented evidence backing up its assertions that Huawei equipment plays a role in Chinese espionage operations, and there are doubts that it has shared much evidence in private either.

According to Schrader of the German Marshall Fund, if U.S. intelligence officials truly had clear evidence that Huawei was helping China to spy, they would be more “forward leaning” in sharing that information with allies.

With the American campaign faltering, U.S. intelligence officials are already beginning to prepare for a world in which Huawei dominates next-generation telecommunications networks. “We are going to have to figure out a way in a 5G world that we’re able to manage the risks in a diverse network that includes technology that we can’t trust,” said Sue Gordon, the principal deputy director of national intelligence, in remarks last month. “You have to presume a dirty network.”

Huawei executives argue the U.S. allegations are irresponsible, and the company’s founder has said he would defy Chinese law on intelligence gathering to maintain his company’s independence. It is a claim China experts find laughable.

“The bigger a company in China gets, the more it needs to align its business goals with the party’s political goals,” said Schrader. “The mere fact that Huawei is able to publicly take a position so at odds with the actual reality of China speaks to the degree of party support it enjoys. ‘Normal’ businesses in China cannot get away with saying they don’t abide by party dictates.”

To satisfy the demands of law enforcement, telecommunications networks are typically built to enable some type of wiretapping function. Such abilities have in the past been subverted by intelligence agencies to snoop on calls and scoop up data, so using Chinese-designed equipment for such networks practically represents an invitation to Beijing to spy, “since the infrastructure itself is designed to support such meddling,” argued Nicholas Weaver, a senior researcher at the International Computer Science Institute.

In an interview with Foreign Policy, Andy Purdy, Huawei’s chief security officer in the United States, pointed out that U.S. espionage activities documented by National Security Agency whistleblower Edward Snowden have created a fundamental attitude of distrust in the telecommunications industry. The Snowden disclosures exposed how American companies were forced to cooperate with U.S. intelligence activities.

“The U.S. fundamentally believes that China would use Chinese companies—even private ones—for the same kinds of things that the U.S. uses American companies for,” Purdy said.

Huawei executives have even begun to taunt Washington over Trump’s warnings that the United States is falling behind in 5G technology. “The U.S. is lagging behind,” Huawei rotating chairman Guo Ping told reporters earlier this year. “His message is clear and correct.”

At the same time, many experts say security fears singling out Huawei equipment are overblown, as nearly all the big telecom equipment makers use Chinese factories to churn out their components.

“The whole Huawei security discussion as it is now is kind of silly and misses the point,” said Ruhlig of the Swedish Institute of International Affairs. “It’s fair to assume that China could hack into 5G anyway, whether you have Huawei equipment in place” or that of another manufacturer, he said. “Banning Huawei will not by itself provide additional security.”

That line of thinking has Huawei officials asking Washington to have another look at its technology. “Let’s talk about proven risk mitigation mechanisms so that we can have a chance to do business in the United States,” Purdy said. The U.S. government, however, has yet to respond to that overture.

Experts are also still debating whether Huawei is as dominant as some officials in Washington fear. Some telecoms executives with experience operating Huawei alongside equipment made by other manufacturers say that it has established the lead, especially in the bread-and-butter technology of transmitting large amounts of data through radio networks.

“From a technology point of view, our view is that specifically in [radio access networks] we see Huawei with a big advantage, a couple of years ahead of any other provider,” said one Western executive who operates a major national mobile network.

Others say Huawei’s purported technical lead may be much smaller, and in any event is hard to measure when so many companies are making progress in different pieces of the 5G puzzle. 5G networks are made up of many different technologies, many of which remain in a nascent stage of development. Engineering task forces are still determining the standards—the technical language different devices will use to talk to one another and exchange data. That means determining who is ahead in the market is more art than science.

“What is meant by being ahead?” said Thelander of the Signals Research Group. “I’m not sure how you define being ahead.”

The previous shift in mobile communications technology—from 3G to 4G and beyond—powered the creation of the current app-based technology. Streaming services such as YouTube and Spotify, which deliver high-fidelity content into users’ smartphones, rely on the technology, as do networked car-hailing services such as Uber. But that transition was more an evolution than a revolution; 5G, while building on existing cellular technologies, represents a breakthrough in the amount of data that can be transmitted, and especially its speed and reliability.

These improvements in speed and reliability are required for the kinds of innovations that technology executives tout as the next phase of the internet revolution. For self-driving cars to become a reality, they will require reliable high-bandwidth connections and near-instantaneous data transmission to be able to react to changing road conditions in milliseconds. Advances in artificial intelligence and machine learning likewise require huge datasets to function as intended.

And whether Huawei is a year ahead of its peers, or a few months ahead, or roughly at the same level may not be the biggest question. 5G is still being developed, and commercial rollout in a limited fashion won’t begin in earnest until next year; the first true 5G networks, which will deliver all the whiz-bang features the technology promises, probably won’t arrive until 2025 at the earliest.

Huawei’s leading role in shaping the most important new technology standard will likely pay dividends in terms of billions of dollars in license fees and could give the Chinese firm an advantage as countries around the world scramble to build 5G networks.

“Whoever sets the standard is going to grab higher market share,” said Ruhlig of the Swedish Institute of International Affairs. That’s already on display in parts of Asia, Africa, and the Middle East, where Huawei rules. “In the developing world, China is internationalizing Chinese technology standards,” “In the developing world, China is internationalizing Chinese technology standards.” he said.

Indeed, as countries around the world scramble to start building advanced telecoms networks, and despite the U.S. campaign against the company, Huawei is becoming an even more entrenched player. Asian countries including Malaysia, Vietnam, and U.S. ally Thailand are all considering Huawei for their 5G networks. So are European and NATO allies of the United States such as Spain, Portugal, Italy, and Hungary, while Germany and the United Kingdom are unlikely to ban it altogether.

For almost 200 years, China has largely been on the receiving end of technology developed elsewhere. Today, it is reasserting, in the most demonstrable way, the technological leadership it enjoyed long ago.

Correction, April 11, 2019: An earlier version of a graphic accompanying this article mistakenly left out patents developed by Samsung. The chart has been corrected.