On the Thursday before Christmas, President Biden called Mexico’s president, Andrés Manuel López Obrador, and asked for help. The number of migrants crossing into the U.S. — about 10,000 per day — had reached the highest level of Biden’s presidency. The surge was creating major problems, including lockdowns at a New Mexico high school where migrants were streaming across the grounds and the closure of a rail bridge over the Rio Grande that carried commercial goods.

López Obrador responded by telling Biden to send a delegation of top officials to visit him in Mexico City. The next week, that delegation, led by Secretary of State Antony Blinken, arrived for talks. Partly in response, Mexico soon began to enforce its own immigration laws more strictly, making it harder for migrants from other countries to use Mexico as a route to the U.S. Among other things, López Obrador’s government has increased deportations of migrants to their home countries and disrupted bus networks run by cartels that funnel migrants from other countries toward the U.S. border.

The crackdown has made a noticeable difference, too.

Migration flows at the U.S.-Mexico border fell more than 50 percent in early January, according to data that the U.S. Customs and Border Protection agency released last week. The numbers have since risen somewhat, officials have told me, but are still well below the December levels.

Mexico’s crackdown doesn’t come close to solving the migration problem, of course. Illegal immigration remains far higher than it was in the 2010s. Many migrants now believe that they will be able to remain in the U.S. for years, so long as they reach the border — regardless of what of the law says. Voters are unhappy about the situation. So are mayors and governors from both parties who are struggling with housing and social services.

Nonetheless, Mexico’s recent efforts offer a reminder: Stricter enforcement of immigration laws really does tend to reduce migration flows.

That point may seem obvious, but it’s one that many politicians from both parties question. In recent days, House Republicans and Donald Trump have criticized the outlines of a bipartisan Senate deal that would significantly tighten border security. Trump suggested it was “worse than no border deal.” (The most plausible explanation for his stance is politics — namely, that continuing border chaos could increase his chances of beating Biden in November.)