Chief Justice John Roberts was praised far and wide last month when he chastised President Trump for referring to a judge who ruled against his migrant asylum policy as an “Obama judge.” The Chief was right to defend the independence of the judiciary, but he’d stand on firmer ground if he also did more to rein in the growing political excesses of the judiciary.

Time and again in the last two years, lower-court judges have overturned Trump policies on dubious legal grounds. Worse, they have issued injunctions that block the policies nationwide before considering the merits. These injunctions used to be a rarity, but judges know that appeals can take months to get to the Supreme Court and in the meantime the executive branch is stymied. Over time this will make the judiciary look more political, not less.

***

One example is Mr. Trump’s recent asylum restrictions. The President's immigration enforcement can be blunderbuss and heavy-handed. But the latest rules are calculated to promote order at the southern border amid an unrelenting flow of Central Americans seeking entry. Any President would have to put limits on this unprecedented migrant surge.

The U.S. asylum system was established after World War II to provide refuge for persecuted foreigners, but it needs an overhaul. Immigrants apprehended at the border can dodge immediate deportation by seeking asylum. Claims can take years to process, and in the meantime applicants are released into the nation’s interior.

We support generous immigration, including flexible guest-worker visas that can adapt to a changing labor market. But many migrants seeking asylum in the U.S. aren’t escaping persecution, and the surge in claims is straining government resources while eroding public support for legal immigration.