A visit to Huawei’s HQ in Shenzhen is a glimpse into the way China’s leadership would like to envision its future. About 180,000 workers throng quietly around a pristine campus in the new-build city, which prizes digital expertise so highly that some outstanding engineers are lured with special rent deals to work on a campus that looks more like architect-designed Silicon Valley than the crowded factories that feature in much of urban China.

I was whisked around examples of sleek bicycles, remote-controlled fridges telling me when food needed to be consumed and super-fast immersive gaming – all showcasing the speed and flexibility of 5G-honed technology. Huawei is the jewel in China’s tech crown, a subject of pride at home and an export success as the world’s biggest supplier of telecoms equipment. But that jewel is fast turning into a flashpoint between Beijing and western governments, emblematic of deeper tensions about trade, security and a divide over the hidden risks of globalised digital advances.

The UK’s defence secretary, Gavin Williamson, has voiced “grave “and “very deep concerns” at the prospect of Huawei providing technology to upgrade Britain’s lagging mobile phone network – after the head of MI5 called coyly for a “conversation” about the risks of embedding Chinese technology in national infrastructure. The US, Canada, Japan, New Zealand and Germany are raising more vocal concerns about prospective leakage from Huawei and other tech companies to the Chinese intelligence services.

Yet in many ways Huawei exemplifies the successes of globalisation. It is a successful global exporter (often backed by huge Chinese bank loans to spread its telecoms products into Africa). You can see a splurge of adverts for its phones in teenage-friendly pastel hues, and it provides a good-value alternative to the dominance of Apple and Samsung in western markets. Huawei worries the west in part because China’s push into 5G and artificial intelligence (AI) threatens to fulfil the Khrushchev-era promise of “catching up with and overtaking” its technological advances.

Google’s Earth: how the tech giant is helping the state spy on us Read more

The arrest in Canada this month of the company’s chief financial officer (and daughter of its founder), Meng Wanzhou, on suspicion of overseeing deals that broke US sanctions against Iran, raised the stakes. Huawei protests innocence, and says its products would never allow a “back door” for the Chinese government to access sensitive data. But given the close eye the Chinese state keeps on major tech companies and laws that put intelligence requirements ahead of the autonomy of businesses, precautionary measures look like a good idea. The question facing the British and other governments, however, is what these should look like without adding to counterproductive trade wars.

Facebook Twitter Pinterest Cultivating a pro-China stance … Jeremy Hunt and Chinese state councilor and foreign minister Wang Yi in Beijing, July. Photograph: Wu Hong/EPA

Our experience in western democracies teaches us to beware both governments and companies gathering data without restraint. We have seen the temptations to abuse that follow. That goes with extra vigour for countries where open debate on such matters is fiercely constrained. One of my interviews with a China tech titan concluded in (his) bad temper about the audacity of asking about the risks to personal liberties from AI. Another, until recently more open, begged for such matters to be discussed off the record.

Yet our own messages are mixed and mangled – and they are not getting any clearer. Britain’s politburo has been split for years on the issue. Theresa May as home secretary dug in against Chinese investment in the Hinkley Point nuclear power plant. Williamson is an ally of the prime minister – he orchestrated her leadership bid and is keen to play a similar role in anointing her successor. So it will be intriguing to see whether his warning is followed up by Jeremy Hunt, the foreign secretary, who has cultivated a pro-China stance as the leading advocate of a free-trade no-deal Brexit.

Choices, so far fudged or muddled through, are unavoidable. We host lavish state visits to drum up trade with royal bells and whistles, and pints of bitter consumed with President Xi in a country pub. May headed her own delegation of business folk to the country, rivalling Chancellor Merkel’s habit of bussing Germany industrialists to China to signal state support for lucrative deals. Post-Brexit visions for offsetting the damage of leaving the European single market tout business with Asia as the solution (in the absence of any major trade deal with the US) – and that means foregrounding China.

The giant that no one trusts: why Huawei’s history haunts it Read more

Alas, there is only so much cake and tea we can sell to each other, so technology has to be part of new trade deals, in the way that steel and machinery was in the past. More household items will be 5G-enabled in the next few years and it will be essential to the development of driverless cars. So even if 5G is kept out of the main telecoms systems, that may prove more symbolic than decisive, as it makes its way into our lives through sundry products and the lure of cheap, available innovations.

Huawei, after a bit of ritual Chinese huff, seems to have got the message: the company is reported to have offered up to £1.5bn worth of “technical changes” to satisfy British concerns, a sign that it is serious enough about western markets to offer compromises. Beyond this standoff, Beijing needs to decide whether the short-term gains of cyber-hacking – in terms of both data and prestige – are worth the damage being done to the companies that are the badge of China’s innovation and diligence.

The west will need to balance fretfulness about security with a confidence that global trade remains the building block of our prosperity and peaceful relations – especially with awkward large powers. It’s not a new trade war we need with the People’s Republic in the year ahead, but a technological truce.

• Anne McElvoy is senior editor at the Economist