Like much of the Mexican business world, Daniel Córdova finds himself grappling with an enormous variable looming across the U.S. border: the imminent return of Donald Trump to the White House.

Córdova oversees a factory outside the city of Monterrey, Mexico, that makes heating and air-conditioning units for Trane, an American company. The first time Trump was president, he unleashed a trade war against China that proved beneficial to Mexican industry. Companies that relied on Chinese factories to make goods for the American market shifted production to plants in Mexico to avoid Trump’s tariffs.

That trend, known as “nearshoring,” gained momentum as President Joe Biden extended tariffs on Chinese imports. Soaring shipping prices during the pandemic heightened the pitfalls of relying on factories across oceans. For companies seeking to close the distance between plants in Asia and customers in the United States, Mexico beckoned as an attractive place to manufacture their wares.

Then, last month, Trump threatened the economics of nearshoring by promising to impose 25% tariffs on all goods entering the United States from Mexico and Canada. Mexican industry was confronted with a high-stakes question: Was Trump bluffing, hoping the threat would pressure the Mexican government to halt the movement of people and drugs toward the border? Or was he really preparing to put tariffs on Mexican imports to force companies to move production to the United States?

Hanging in the balance is the pace of investment and job growth in Mexico, along with the availability of a vast profusion of imported goods in the United States — from fresh fruits and vegetables to auto parts.

At the Trane factory in the industrial enclave of Apodaca, Córdova is getting ready. If the tariffs materialize, the company could shift orders to its American factories. Yet, he remains optimistic that the status quo will prevail, because the Mexican and U.S. economies depend on each other for parts and raw materials for their own finished products. Although Trump is known to be unpredictable, Córdova cannot imagine him impeding the movement of products across the border — a course that economists warn would raise prices for American consumers and slow economic growth.

“We are together in this adventure, the United States and Mexico,” Córdova said, as machines on his factory floor pounded hunks of metal into parts for heating units that would be assembled in Tennessee. “We need each other. A divorce is never cheap.”

As the Trump administration vows an expanded trade war, businesses in Mexico are continuing with factory expansions. They assume their country remains central to the most fervent American aim: reducing dependence on factories in China.

Many Mexican business leaders assert that their companies are positioned to thrive during another Trump administration. So long as he proceeds with his promise to increase tariffs on Chinese imports, that will amplify the need for alternative places to manufacture goods.

“Trump hates China more than he hates Mexico,” said Isaac Presburger, whose family apparel business outside Mexico City has long exported to the United States. “This is a huge opportunity.”

For now, uncertainty reigns. Mazda, a Japanese automaker, is holding off on future investments in Mexico until Trump’s plans take shape. Honda has told investors that tariffs on Mexican-made vehicles could force it to consider shifting production elsewhere.

“If I was a member of a corporate board or a CEO, I’d think hard right now about investing in Mexico until you get more clarity,” said Shannon K. O’Neil, a Latin America expert at the Council on Foreign Relations in New York.

The nearshoring boom has been bountiful in Monterrey, a metropolis of more than 5 million people sprawling across a desert valley framed by the jagged peaks of the Sierra Madre. The capital of Nuevo Leon state, Monterrey lies within three hours of the U.S. border by truck. It has a reputation for relative security along with luxurious hotels and restaurants. That combination has attracted foreign investment.

Over the first 11 months of this year, nearly $23 billion in foreign investment was committed to more than 100 projects, according to the state government. Volvo, a Swedish company, recently began erecting a truck factory. John Deere is building a plant to make construction equipment.

On a recent evening, Emmanuel Loo, Nuevo Leon’s economy secretary, held court at an outdoor restaurant, serving tacos to a pair of consultants — one a former executive at Intel, the American computer chip manufacturer. Loo had retained them to attract investment that could make the state a hub for the semiconductor industry.

He expressed confidence that the Trump administration would not disrupt those plans. He said he had taken assurances from meeting with Donald Trump Jr., the president-elect’s eldest son, in Houston just before the election.

“Trump can’t do what he wants to do on China without Mexico,” Loo said.

Mexico’s role as an alternative to China has in recent years propelled a construction boom in Monterrey.

Wisdom Digital Logistics, which operates warehouses and arranges trucking for businesses on both sides of the border, recently opened a fourth warehouse in the area and is already looking for a fifth.

“We’re getting calls from all over the place — the French, the Germans, the Italians,” said the company’s CEO, Edgar Pereda. “They want to know how to guarantee their supply chains, and they’re trying to establish a presence in Mexico.”

Bosch, a German home-appliance giant, has shifted some production from China to Mexico, opening a factory in Monterrey in July. That has generated business for local suppliers, among them Plastiexports, which makes plastic parts.

Plastiexports recently opened a factory in Saltillo, an industrial city in the neighboring state of Coahuila. “I saw the potential for nearshoring,” said CEO Baldwin Britton.

Inside the plant, robotic arms plucked lids for plastic storage containers from the jaws of steel molds. The factory had 41 machines in operation. Britton planned to double that number by the end of next year. “The demand is there,” he said.

He saw no reason to worry about Trump’s tariff threats, although he expected the Trump administration to demand changes to Mexico’s trade policy. “They will pressure Mexico to limit investment from Chinese companies,” he said.

In recent years, Chinese companies have constructed factories in Mexico, making use of a North American free-trade pact to gain access to the U.S. market. So long as they satisfy so-called rules of origin — requirements that certain percentages of parts and raw materials are drawn from North American suppliers — their products are treated as Mexican made. They qualify for duty-free access into the United States.

Last year, Chinese companies made 42 investments in Mexico totaling $3.77 billion, more than tripling the volume in the years before 2020, according to the Rhodium Group, an independent research organization.

A single industrial park on a former cattle ranch north of Monterrey is home to 40 Chinese companies that have built factories. Developers recently acquired acreage nearby for an expansion.

Within the U.S. political sphere, Chinese investment in Mexico is frequently described in nefarious terms, as the forging of a backdoor into the United States. But one of the developers of the industrial park, César Santos, argued that the presence of Chinese brands represented a triumph of the North American trading bloc. Chinese companies are employing Mexican workers while buying parts and materials from suppliers as far away as the United States and Canada.

The terms of the North American bloc were negotiated by Trump, who called it “the largest, most significant, modern and balanced trade agreement in history.” If Trump imposes indiscriminate tariffs on Mexican exports, he will effectively be renouncing his own deal, Santos said.

The pact, known as the United States-Mexico-Canada Agreement, is due for a formal review in 2026. Some experts see Trump’s tariff threat as a way to force the Canadian and Mexican governments to agree to an earlier renegotiation of its terms. He could seek to add rules making it harder for Chinese companies to use Mexico as an entry point to the American market.

The auto industry will almost certainly command special focus in any renegotiation. Under current terms, Chinese automakers can set up factories in Mexico and sell cars into the United States free of duty, provided that parts and materials from the region make up at least 75% of the value of the finished vehicles.

Seeking to prevent that possibility, Trump has threatened tariffs as high as 200% on all cars made in Mexico.

Auto industry leaders in Mexico note that such a policy would sharply increase costs for Americans.