For decades, communities along the U.S.-Mexico border stretching from Brownsville, Tex., to San Ysidro, Calif., developed symbiotic economies with their sister cities in Mexico, with residents of both countries traveling to the other to work, shop and visit relatives.

U.S. companies operate factories in Mexico's border towns, providing low-skilled, low-wage jobs in the textiles and electronics industries to more than a million Mexicans in those communities, who in turn spend much of their paychecks in the United States, boosting the local tax base.

But President Trump’s immigration and trade policies could jeopardize that economic relationship, warn local officials, residents and researchers studying border economies. In his first days in office, Trump has vowed to begin construction on a border wall within months and renegotiate the 23-year-old North American Free Trade Agreement.

There already are signs that the diplomatic relationship between the countries is deteriorating, with Mexican President Enrique Peña Nieto canceling a meeting with Trump next week amid tensions over his border wall plan. Trump has reiterated his intent for Mexico to pay for the structure, and on Thursday his press secretary announced that the president could impose a 20 percent tax on all imports from Mexico to pay for the wall. (Trump had previously threatened to impose a 35 percent tariff on goods imported from the country as a way to keep jobs in the United States.)

“The economic livelihood of these communities are on the line if the relationship with Mexico is not managed in a cooperative way,” said Chris Wilson, deputy director of the Mexico Institute at the Woodrow Wilson International Center for Scholars. “Their commerce with Mexico is their lifeblood. Anything putting those trade relationships at risk puts their communities at risk.”

Exports to Mexico from California, Arizona, New Mexico and Texas make up more than half of the national total, according to a Wilson Center report on the U.S.-Mexico border economy. And Mexico exports more to the four U.S. border states than it does to the rest of the world combined, excluding the United States.

NAFTA set the foundation for the current economic ecosystem in border towns, leading to the rapid growth of twin manufacturing plants, known as maquiladoras.

The system allows multinational companies operating in the United States to send equipment and raw materials to their plants in Mexico for assembly without paying import duties, and then export the finished product back to the United States. Forty percent of U.S. imports from Mexico are composed of materials originally produced in the United States, according to the Wilson Center, a Washington-based think tank.

But Trump refers to NAFTA as “the worst trade deal in history” and blames it for “thousands and thousands” of American plant closures and the loss of American manufacturing jobs, even though much of the job losses were caused by automation.

“By renegotiating NAFTA, all of these economies that have existed for decades is up in the air,” said Robert Koulish, an immigration law professor at the University of Maryland whose research focuses on the U.S.-Mexico border. The construction of a permanent border will likely provide cheap temporary labor, he said, but destroy border economies in the long run. 

While much of the border has become militarized following the Sept. 11, 2001, terrorist attacks — with some type of barrier already stretching 652 miles of the 1,933-mile border — Koulish said free trade helped mitigate border tensions. For instance, special “smart” cards allow frequent border crossers to avoid waiting in long lines.

This week, Trump's executive order for the border wall construction caused stock prices to jump for Cemex SAB, a Mexican cement company that is the largest cement maker in the Americas. U.S. materials and equipment companies also stand to benefit.

“What you have with Trump now is more security, but he may also take away free trade. The border has never functioned that way,” Koulish said. “These economies and this culture that have depended upon this system are now being slammed in two directions, creating a lot of fear, anxiety and uncertainty.”

In McAllen, Tex., the maquiladoras industry spurred commerce on both sides of the border, with 37 percent of the city’s tax base coming from Mexico, Mayor Jim Darling said. About 1,500 factory managers, including Americans, Japanese and Koreans, live in McAllen but work in Mexico, he said. Their commutes help generate millions of dollars in bridge revenue for McAllen and its neighboring towns.

“If our relationship with Mexico sours, it would be devastating for our economy,” Darling said.

The effect of a trade war with Mexico would cascade beyond lost jobs in the U.S. plants. Downtown stores would lose business, lay off workers and close up shop, Darling said. Mexican investors would likely sell off their U.S. properties, leading to plummeting real estate values, he said.

Darling said he plans to send a letter to Trump inviting him to visit McAllen. “We are Americans too,” Darling said. “Look at our faces when you implement policies that will affect us.”

Members of the Congressional Border Caucus held a hearing this week in Washington with business leaders from the border to highlight the value of co-production and how the border economy works.

“There is a lot of room for improvement to NAFTA but to scrap it or start taxing at the border, that’s a job killer,” Rep. Beto O’Rourke, a Democrat from El Paso, told The Washington Post in a subsequent interview.

The city has evolved from being the “low-wage capital” of North America pre-NAFTA to a trading community, he said, with a fifth of the trade between the U.S. and Mexico flowing through the ports in El Paso and Ciudad Juarez. In El Paso, the second busiest port in the nation, one out of every four jobs is dependent upon trade with Mexico, O’Rourke said.

The $90 billion in annual cross-border trade and $1.45 billion in retail shopping supports nearly 100,000 jobs in the El Paso region, he said. Companies in El Paso manufacture components that go into medical devices that are assembled in Mexico. The city also is a base for a massive logistics industry that revolves around trade with Mexico, including trucking and warehouse companies as well as accountants, attorneys and consultants involved in business negotiations.

“We had retooled our local economy to make the best of the situation,” O’Rourke said, referring to the tens of thousands of jobs lost immediately following the 1994 NAFTA deal. “Now we have a president who is coming in to say we are going to do away with all that. That will not stop Mexico from manufacturing and trading. They will just stop doing it with us. They will find willing partners with Asian economies and businesses all over the world.”

The jobs created in Mexico are vital to local commerce on the U.S. side of the border. The 20,000-person town of Nogales, Ariz., is economically dependent upon laborers and tourists from Nogales, Mexico, a town ten times the size of its U.S. counterpart, said Tony Sedgwick, who sits on the board of directors of the Border Community Alliance. Mexicans with paychecks and bank accounts are issued border crossing cards allowing them to visit Nogales, Ariz.

“We have a Home Depot, a Walmart, a Ross; 95 percent of their customers are Mexicans walking or driving across the border to shop,” said Sedgwick, a rancher, businessman and former lawyer

“For us, the border is a doorway, a place of opportunity,” he said. “We are an integrated economy in the border region.”