BEIJING (NYTIMES) - It is one of China's proudest corporate success stories: A colossus in cutting-edge technology that elbowed out Western rivals to become the biggest supplier of the hardware that connects our modern world.
Now, all around the globe, the walls are going up for Huawei.
The United States, which for years has considered the Chinese telecommunications giant a security threat, aimed a straight shot at the company's leadership when it secured the arrest, in Canada, of Huawei's chief financial officer.
But lately, Huawei's setbacks have come on multiple fronts, from New Zealand and Australia to Britain and Canada. China sees the company as a pivotal driver of its ambitions for global technological leadership. Increasingly, much of the rest of the world sees it as a potential conduit for espionage and sabotage.
Huawei said on Thursday (Dec 6) that it was not aware of any wrongdoing by its chief financial officer, Ms Meng Wanzhou, who is a daughter of the company's founder, and that it complied with the law wherever it operated. The company has long denied that it spies on behalf of Beijing.
For many years, the fog of distrust surrounding Huawei was a problem that was largely confined to the US. Large US mobile carriers such as AT&T have avoided using Huawei's equipment in their networks ever since a 2012 congressional report highlighted the security risks.
In response, Huawei focused its business efforts elsewhere. Its success in wealthy places such as Europe helped it become the largest maker of telecommunications equipment, as well as the No. 2 smartphone brand.
Of the more than US$90 billion (S$123 billion) in revenue it earned last year, more than a quarter came from Europe, the Middle East and Africa.
Now, a wider patch of the world appears to be siding with Washington against Chinese technology. A turn en masse against the company, led by governments in many of its most important markets, would have grave implications for its business.
Australia barred Huawei earlier this year from supplying technology for the country's fifth-generation, or 5G, mobile networks. New Zealand last week blocked one of its leading mobile carriers from buying Huawei's 5G gear.
Britain's intelligence chief, in a rare public appearance this week, said that the country had a difficult decision to make on whether to allow Huawei to build its 5G infrastructure.
And Canada's top spy echoed those concerns, without naming Huawei or China, in a speech on Tuesday. Huawei has tested 5G equipment with major mobile carriers in both Canada and Britain.
Behind the tariff fight that has engulfed Washington and Beijing lies a deeper contest for leadership in future technologies such as super-computing, artificial intelligence and 5G mobile Internet.
For many people in China, the contest feels not merely commercial but civilisational. At stake is the country's ability to claim its rightful place as a superpower.
"The Chinese government and Chinese companies must face these new circumstances, take up new countermeasures and get through this stage of crisis," Mr Fang Xingdong, founder of ChinaLabs, a technology think tank in Beijing, said on Thursday.
"This is a necessary rite of passage for China's global technological rise."
Huawei has tried to avoid being pulled into this fight. In an internal memo from January that was reviewed by The New York Times, Mr Ren Zhengfei, the company's founder, outlined a strategy for navigating these uncertain times.
The key, he wrote: Keep adapting. But do so quietly.
"Sometimes, it's better to find a safe place and wait for stormy weather to pass," Mr Ren wrote.
Europe was one such place, Mr Ren said. Huawei has cultivated political friendships and invested heavily in places like Britain.
"Eventually, through years of effort, our goal is for Europeans to perceive Huawei as a European company," Mr Ren wrote.
Canada seemed to be another safe harbour.
"The Canadian government is very sensible and open, giving us enormous confidence in our investments in this country," Mr Ren wrote.
This was all before Washington nearly put out of business Huawei's main Chinese rival, called ZTE.
In April, the Commerce Department banned ZTE from using components made in the US after saying the company had failed to punish employees who violated US sanctions against Iran and North Korea.
The move was effectively a death sentence because ZTE relied heavily on US microchips and other technology.
In building its case against ZTE, the US government began investigating Huawei as well.
When the Commerce Department first announced its findings against ZTE in 2016, it released an internal ZTE document illustrating best practices for evading US sanctions.
In describing the approach, the document cited a company it nicknamed F7 as a model for how to pull it off. The description of F7 in the document matched Huawei.
A few months later, the Commerce Department subpoenaed Huawei and requested all information about its export or re-export of US technology to Cuba, Iran, North Korea, Sudan and Syria, according to a copy of the subpoena seen by The Times.
The probe widened this year when the Treasury and Commerce departments asked the Justice Department to investigate Huawei for possible sanctions violations. Prosecutors in the Eastern District of New York took on the case.
Eventually, the Trump administration decided to ease its punishment of ZTE, in an effort to cool tensions with China's leader, Mr Xi Jinping, before a historic North Korea meeting.
But the power that Washington wielded over the fates of Chinese tech companies had been made very clear to people on both sides of the Pacific.
In October, the Commerce Department imposed export controls on Fujian Jinhua, a state-backed semiconductor company that has been accused of stealing US chip designs.
Should Huawei be subjected to a ban on using US technology, the consequences would be significant, although perhaps not as life-threatening as they were for ZTE.
One crucial difference is that Huawei, unlike ZTE, does not depend extensively on outside vendors such as Qualcomm for the main microchips in its smartphones.
Around two-thirds of the handsets that Huawei sells contain chips made in-house, said Mr Sean Kao, a hardware analyst at the research firm IDC.
Still, US firms supply other kinds of chips in Huawei's gear as well as optical equipment for its fibre cable networks and other specialised parts.
"I don't know exactly how many suppliers are affected," said Mr Stéphane Téral, senior research director at data provider IHS Markit.
But one thing is certain, he said: They won't be easily to substitute.