Alphabet's Google is moving some production of Nest thermostats and server hardware out of China, avoiding punitive US tariffs and an increasingly hostile government in Beijing, according to people familiar with the matter.

Google has already shifted much of its production of US-bound motherboards to Taiwan, averting a 25% tariff, said the people, asking not to be identified discussing internal matters. While US officials have pinpointed Chinese-made motherboards as a security risk, Google didn't bring that up during discussions with its suppliers, they said. Tariffs have also pushed American-bound production of its Nest devices to Taiwan and Malaysia, the people said.

The migration is taking place as companies both foreign and domestic seek to pivot their production away from China amid US President Donald Trump's efforts to reset the perimeters for global trade and manufacturing. Beijing is showing growing signs also of clamping down on American corporations from Ford Motor to FedEx within the world's largest consumer market and production base.

That's prompting US companies, long accustomed to using China as the world's workshop, to explore alternatives. The Taiwanese contract manufacturers that make most of the world's electronics, including Apple partner Foxconn Technology Group, have since 2018 accelerated the shift at their clients' behest. Foxconn said on Tuesday that it has enough capacity to make all iPhones bound for the US outside of China if necessary, although Apple has so far not asked for such a shift.

READ: WATCH: US-China trade war ripples through market again after Trump comments

While Google's hardware production in China pales in comparison to the likes of Apple, its shift may herald a broader trend as tensions between Beijing and Washington escalate. The US search giant earns some advertising revenue from the country and had explored avenues to court consumers and corporations in the world's No. 2 economy, from sharing artificial intelligence tools to even a censored search service. It's also lobbying Washington for permission to continue supplying Android to Huawei Technologies, the Financial Times has reported.

Widening footprint

It's widening its footprint elsewhere: Google announced in March it's creating a new campus in Taipei and expanding staff on the island, though it's unclear whether that's related to its manufacturing diversification. Google declined to comment on production adjustments.

Among the Google hardware saddled with higher tariffs, server motherboards are among the most critical to the tech giant's operations. The company builds its own data centres in the US and elsewhere. Those computing hubs help it offer search and productivity tools on a cloud services platform, and power the world's largest mobile platform as well as services from mapping to search.

And among major US tech companies that operate so-called hyperscale or giant data centers, Google is keener than others including Facebook, Microsoft and Amazon.com to shift server motherboards out of China. That's because it sometimes procures the components only, while its rivals tend to buy complete server racks from suppliers, one person said.

Motherboards are categorized as printed circuit board assembly, which face 25% tariffs if they are imported directly into the U.S., while server racks as a whole have not yet been affected. Many US-bound servers are assembled in Mexico, while there are also companies that assemble those locally in America.

Chairman Simon Lin at Wistron Corp., which makes servers for Facebook and Microsoft, said on Wednesday it too is looking to shift some production away from China and perhaps to the US, but didn't elaborate or specify which products.