(Bloomberg) -- Alphabet Inc.’s Google is moving some production of Nest thermostats and server hardware out of China, avoiding punitive U.S. tariffs and an increasingly hostile government in Beijing, according to people familiar with the matter.

Google has already shifted much of its production of U.S.-bound motherboards to Taiwan, averting a 25% tariff, said the people, asking not to be identified discussing internal matters. While U.S. 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 U.S. 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 Co. to FedEx Corp. within the world’s largest consumer market and production base.

That’s prompting U.S. 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 Inc. 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 U.S. outside of China if necessary, although Apple has so far not asked for such a shift.

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 U.S. 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 Co., the Financial Times has reported.

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 centers in the U.S. 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 U.S. tech companies that operate so-called hyperscale or giant data centers, Google is keener than others including Facebook, Microsoft Corp. and Amazon.com Inc. 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 U.S.-bound servers are assembled in Mexico, while there are also companies that assemble those locally in America.