Mexico replaced China as the top exporter to the United States in 2023 AFP

Sparks fly as a laser slices through metal in a factory in Mexico, which is preparing for a wave of foreign investment thanks to heightened tensions between the United States and China.

Geopolitical frictions and supply chain gridlock during the Covid pandemic have prompted a growing number of companies to move manufacturing operations to the doorstep of the world's biggest economy.

Last year, Mexico replaced China as the top exporter of goods to the United States, helped by the trend known as "nearshoring" or "friendshoring."

According to Humberto Martinez, president of manufacturing association Index, there is a "boom" in companies relocating to Mexico.

His organization expects around $9 billion of foreign investment in Mexico's export manufacturing industry this year, predicting a "new world economic order."

Lower labor costs, tax incentives and a North American free trade deal that took effect in 1994 have long lured companies south of the US border.

Now, fears of a Cold War between the United States and China have added to the appeal of Mexico, which will hold elections on June 2 that are expected to produce its first woman president.

Both of the two main candidates have touted the potential benefits of nearshoring.

A new golden age appears to beckon for Mexico's "maquiladoras" -- factories that for decades have been processing and assembling imported materials and components, then sending them back to the United States.

"We're in a privileged location due to our proximity to the border to be able to export to the main market, which is the United States -- the largest market in the world," said Juan Jose Ochoa, director general of Aztec Technologies in northeast Mexico's Monterrey.

"Political and economic issues caused a lot of productive capacity to move from the United States to Asia more than a decade ago. And finally, for reasons of international relations, much of that capacity is returning," he said.

Nearby, workers wearing hard hats and safety glasses used laser cutting machines and other high-tech equipment to process metal for the company's clients, which include US corporate giants John Deere and Honeywell.

"Now there are many companies that are setting up here. We know this because many of them knock on the door so that we can supply them with parts," Ochoa said.

Foreign direct investment in Mexico hit a record high of more than $36 billion in 2023, 38 percent of which came from the United States, according to the economy ministry.

The nearshoring boom is more than just hype, "it's definitely a reality," said Juan Pablo Garcia, head of CAINTRA, an organization in Nuevo Leon state that represents several thousand companies.

Companies that have already announced nearshoring-related expansions in Mexico include Taiwanese tech giant Foxconn, Danish toy giant Lego and US Barbie doll maker Mattel.

A vast sprawl of industrial parks already surrounds Monterrey, the capital of Nuevo Leon that's home to glass-fronted office blocks and luxury hotels catering to well-heeled business executives.

A plot of land near the city has been earmarked for a giant new factory announced last year by electric car maker Tesla, though construction has apparently been delayed.

Nearshoring is likely to be a gradual process "that's going to take many years," said Elijah Oliveros-Rosen, chief emerging markets economist at S&P Global Ratings.

Most of the activity seen so far has been in the expansion of industrial parks rather than lots of major manufacturing firms relocating to Mexico, he said.

"That hasn't boomed," he told AFP.

Companies looking to move to Mexico face challenges including insecurity, water scarcity, labor requirements and the need for a consistent supply of energy, particularly from renewable sources, Oliveros-Rosen said.

In 2022, residents of Monterrey faced weeks of water rationing.

Contemplating the future at his factory, Ochoa also saw many challenges, including a need for infrastructure development and worker training.

"If a logger comes to a forest where there are many trees and begins to consume the resources without thinking about sustainability and long-term development, in the end it won't be possible to replant what's needed for the coming decades," he said.