For years, Mexico had been a “transit country,” one through which migrants crossed to reach the US. But with their numbers increasing, and the US more determined than ever to turn them away, Mexico was becoming a terminus. Immigration was morphing into a toxic political issue in Mexico, a subject of resentment and contention. Leaders had to recalibrate.

