Juan Hernández has farmed avocados in the Mexican highlands for thirty years. A decade ago, he watched chemicals from his orchard wash into the river below during rainy season. Today, the water runs clearer, and so does his thinking about what made the difference: a trade deal that changed how he farms.

"We used to spray everything, every week," Hernández said. "Now we're more careful. We check first, then treat only what needs treating."

That careful approach, research now shows, has quietly transformed one of Mexico's most important waterways. A study published by two economists found that nitrogen pollution in rivers near avocado-growing regions fell by about 10 percent after 2016, compared with similar rivers elsewhere in Mexico. Nitrogen is the chemical that, when washed off farm fields, feeds algae blooms that choke rivers of oxygen and kill fish.

The shift traces back to a single policy change. In 2016, the United States opened its borders to avocados from every Mexican state—not just Michoacán, which had been the sole source for decades. But that access came with strings attached. Mexican farms had to meet strict U.S. Department of Agriculture standards, including regular inspections, certification requirements, and tests proving their fruit was free of pests like avocado weevils and fruit flies.

To keep their exports flowing across the border, farmers couldn't rely on the old habit of spraying pesticides across entire orchards. Heavy spraying risked exceeding U.S. residue limits, which could get entire shipments rejected at the port. Instead, growers began scouting their fields first, setting traps, and treating only the spots where problems actually showed up.

"The border became the enforcement mechanism," said Dr. David K. Garratt, one of the researchers who conducted the study. "When you face losing access to the most valuable market in the world, you change your behavior."

Pesticides and nitrogen fertilizers tend to be applied together in avocado farming. When growers cut back on one, it made sense to cut back on the other. Farmers discovered they could use 6.6 percent less nitrogen fertilizer without hurting their harvests—saving money while also protecting rivers downstream.

The researchers compared avocado-growing municipalities with similar non-growing areas before and after the trade rules changed. If anything else had caused the improvement, they reasoned, both types of areas would have improved equally. But only the avocado regions showed cleaner water.

Of course, not every crop or country has Mexico's particular advantages. The U.S. buys roughly 90 percent of Mexico's avocado crop—about 1.2 million metric tons per year. That concentrated demand gave farmers a powerful reason to clean up their act. Smaller markets or less valuable crops might not give growers the same incentive.

Still, the results offer a rare piece of evidence that trade deals can do more than boost commerce. When designed thoughtfully, with clear environmental standards, they can reshape farming practices in ways that benefit ecosystems half a world away from the consumers enjoying the final product.

For Juan Hernández, the change has become simply good business. "My children swim in that river now," he said. "We couldn't say that ten years ago."