Putting undocumented immigrants on a path to citizenship, modulating immigration flows to suit the needs of industry and agriculture, and at last holding employers fully accountable for the legal status of their employees are the most effective border-control strategies the U.S. could put in place. If there’s no opportunity to be had in an illegal labor market, there will be few undocumented immigrants risking their lives to take advantage of it.

Thus the secret of immigration reform isn’t first to secure the border before setting undocumented workers right with the law. It’s the reverse: First create a regime that ensures the legal status of workers, with a regulated supply of migrants and sharp penalties for employers who violate the law.

The passions elicited by border politics make this approach difficult, in part because the demand for a lock on the nation’s door seems so elemental. As Mexico and its neighbors grow more prosperous (with help from trade with the U.S. and Canada), the pressure on the border will decrease.