Jesus Rodriguez, center, and his wife Berta Salazar look over a problem with his documents while seeking help from Norma Canales Gomez, Tuesday, Feb. 17, 2015, at the Mexican Consulate office in McAllen, Texas. (Nathan Lambrecht/AP)

TO THINK, as we do, that President Obama overstepped his authority by shielding more than 4 million illegal immigrants from deportation, with no assent from Congress, does not mean that a federal judge should have license to invalidate the president’s order on the basis of tendentious logic.

Yet that’s the effect of a ruling Monday by U.S. District Judge Andrew S. Hanen in Brownsville, Tex., whose well documented distaste for the Obama administration’s immigration policies explains why similarly predisposed Republican-led states turned to him for relief.

The judge, in issuing an injunction blocking the president’s order from taking effect, reached no conclusion on the constitutionality of Mr. Obama’s executive order — although there’s little doubt where he would come out on that question.

Rather, Judge Hanen agreed with the states that their lawsuit cleared minimum procedural requirements and could go forward. He had to stretch so far to reach even that modest conclusion that we hope an appeals court will lift his stay while the case proceeds.

The judge made a persuasive argument that Mr. Obama’s action comes closer to rewriting law than to a conventional exercise in prosecutorial discretion. But he was far less persuasive in arguing that Texas and 25 other Republican-led states likely are entitled to challenge the president’s order in court. Shrugging off extensive precedent that establishes immigration law as squarely within federal authority, the judge based his finding mainly on the supposed financial harm the states would incur if they had to issue driver’s licenses to immigrants who might be newly entitled to them — an injury to Texas the judge vaguely estimated at “millions of dollars.”

Putting aside the slapdash guesswork involved at arriving at the dollar cost of issuing driver’s licenses to an unknown number of prospective applicants — or the “harm” it would inflict on Texas and its $100 billion annual budget — the logic falls flat. By the judge’s reasoning, practically every immigration action by the federal government could be said to impose a cost of some sort on the states, and could therefore provide a basis for a lawsuit.

No doubt it is frustrating to opponents of Mr. Obama’s action to have no ready remedy. But frustration with possible presidential overreach cannot justify judicial overreach. Congress, as we have argued before, is entitled to pass legislation defunding the executive action. But Republicans do not have the votes in the Senate to do so, and they certainly lack the votes to override a presidential veto if they did. That is what has led the Republican majority to its current self-defeating position of refusing to fund a clean spending bill for the Department of Homeland Security, thereby risking a partial shutdown beginning March 1.

In fact, if there is a silver lining in Judge Hanen’s decision, it is the escape hatch it offers to Republican House Speaker John Boehner (Ohio). Now that the executive actions have been stalled by a judge’s ruling, Mr. Boehner is in a good position to convince his caucus to pass a spending bill with no poisonous riders. If he has the dexterity to do so, it will lend credence to the GOP’s case that it is prepared to use its majority in Congress to govern, not just grandstand.