NOGALES, Sonora — Protesters were blocking the cross-border railroad tracks last week on the Mexican side of the line at Nogales — a choice that demonstrated the complexity of our binational relationship.

The idea was to protest a sudden increase in the price of gasoline imposed by the Mexican federal government.

But in blocking trains, they were also blocking the export of cars from Ford’s Hermosillo plant to the United States. That is one of Sonora’s biggest employers, with more than 3,600 employees, and it’s poised to grow even more thanks, paradoxically, to Donald Trump.

Ford’s recent decision to honor president-elect Trump by not opening a new plant in San Luis Potosi, Mexico means the company is going to grow not only in Michigan but also to begin assembling the Focus model in Hermosillo.

It gets more complicated.

Trump’s election was also one of the factors that drove the gasoline-price increase in the first place, by accelerating the decline in the value of the peso, now trading at about 21 to the dollar. Because of the inefficiency of its oil industry, Mexico must buy much of its gasoline on the open market in dollars, so as a result of the falling value of the peso, the gasoline costs Mexico more. Hence the price increase and the protests.

In the Trump era, the danger is that our new federal government will view Mexico more as a competitor to vanquish rather than as a partner in prosperity. The fact is we are so interdependent, especially in the border region, that any rude gesture from the White House has surprisingly profound impacts on both sides of the line.

“Donald Trump is a person who doesn’t like Mexico,” protester Daniel Clemente Cruz told me after leading the demonstrators in the Mexican national anthem. “We are neighbors, we want good relations. But if he doesn’t cooperate, we obviously have our dignity.”

It would be supremely silly to get into puffed-up hostilities over perceived indignities. But it feels like that’s the way we’re headed. The president-elect has not only arm-twisted American companies into reducing the jobs they’re planning to move to Mexico, but he’s also gone after Toyota.

Thursday on Twitter, Trump wrote “Toyota Motor said will build a new plant in Baja, Mexico, to build Corolla cars for U.S. NO WAY! Build plant in U.S. or pay big border tax.”

On Friday, former Mexican President Felipe Calderón responded with some common sense: “The more jobs you destroy in México, the more immigrants the American people will have. Think a little!”

It’s not that winning jobs for Americans is a bad thing — it’s that taking them from Mexicans is more harmful than you’d think to Americans. Consider the effects that the falling peso and the Great Recession has had on our side of the border.

The number of pedestrians crossing from Mexico into the United States at Nogales declined by 59 percent from 2006 to 2015, the latest year for which full-year figures are available. The shopkeepers in downtown Nogales, Arizona are closing some stores, as the local newspaper reported. There isn’t enough business.

Tucson’s stores also suffered this Christmas season from the weak peso. That’s not a small matter — in 2007-2008, the last year this type of analysis was done, Mexican shoppers directly created 9,426 jobs in Pima County by spending almost $1 billion here, a University of Arizona study found.

But we could do even better if a broader swath of the Mexican population were doing better.

In Nogales, Sonora, one humble 55-year-old man, Luis Enrique Aguirre, was hanging out on the edges of the crowd and took a while to warm up to being interviewed. Eventually, he told me “Reforms are harder on the poor. Any change — it makes the poor poorer and the rich richer.”

The specific reform he was referring to was the freeing of gasoline from price controls, the move the Mexican administration made this month. But reform has become something of a dirty word to Mexico’s poor because it has often meant removing policies that protected the poor in the name of opening up Mexico’s economy.

Aguirre went on, “The problem isn’t just mine or that of any organization. The problem belongs to all of Mexico, especially to the poor. They made reforms to give more power to the rich. But those people who eat once a day, or don’t eat at all, they don’t matter to the president.”

Of course he was referring to President Enrique Peña Nieto, but that sentiment is apparently even more true of Trump, who appears to view our relationship with Mexico as a zero-sum game to be won or lost.

Energy expert Jorge Piñon, of the University of Texas-Austin, agrees that the well-being of the country is not what was on Peña Nieto’s mind when he pushed through the price increases this month. It was politics, argued Piñon, who is director of the Center for International Energy and Environmental Policy in Austin and was president of Amoco Oil of Mexico.

“The opening up of retail gasoline to reflect true international oil prices was not to happen until 2018,” he told me Friday. “For political reasons, they moved it forward to 2017, because they knew it was going to have a political effect. They didn’t want it to affect the elections of 2018.”

Although Mexico’s energy sector was liberalized starting in 2013, not enough foreign investment has occurred in infrastructure like pipelines and refineries to optimize the production and movement of gasoline, he said. Waiting the extra year would have helped, but it would have introduced the freeing of price controls — and the possible rise of gas prices — into the next Mexican presidential campaign.

If we end up in a trade war with Mexico, as Trump casually suggested in his tweet about Toyota, then who knows what will happen to American companies’ investments in Mexico’s energy sector. The potential improvements to Mexico’s oil infrastructure could be delayed indefinitely, to the detriment of both countries.

That reflects the thorough interdependence our countries have developed since NAFTA came into effect in 1994.

“Things flow back and forth across the border in massive amounts,” said economist George Hammond, director of the Economic and Business Research Center at the UA’s Eller School. “Tight and complex supply chains have developed. Trying to unwind that in a simplistic way will be problematic.”

The same is true of Mexican leaders who throw up barricades to cross-border commerce. At the train tracks, an outraged group of protesters told me how, on Wednesday, the demonstrations forced Mexican customs officials to work across the border on the United States’ side of the DeConcini port of entry. There, they stopped people from bringing into Mexico extra containers of gas bought in the United States.

Rosa Isela Gomez, 49, told me the cost of filling up her car has gone up by about 30 percent — and “now they don’t want to let us cross to bring gas back from over there,” where the price is cheaper.

Her well-being, and that of the other protesters blocking the Fords from coming north into the United States, matters to us here in Arizona — maybe more even than the jobs of 700 auto workers in Michigan.

Contact: tsteller@tucson.com or 807-7789. On Twitter:

@senyorreporter