The 26 states that sued President Obama over his unilateral amnesty plan for illegal aliens won a major battle on Monday when a federal judge issued a temporary injunction against the plan’s implementation. In a fitting bit of irony, the order was issued on President’s Day, a day when we remember the great men who fulfilled their duties as heads of the second branch of government.

In his order, Judge Andrew Hanen enjoined Jeh Johnson, secretary of the Department of Homeland Security, from implementing “any and all aspects or phases of the Deferred Action for Parents of Americans and Lawful Permanent Residents ‘DAPA’) program as set out” by Johnson in his Nov. 20, 2014 memorandum that executed the president’s announced plan. In other words, the Obama administration can no longer implement the executive actions Obama took on immigration.

Judge Hanen’s reasoning is set out in an opinion that is over 120 pages. But in essence, as the judge himself summarizes, the injunction is being issued “due to the failure of the defendants to comply with the Administrative Procedure Act.” As I explained when the lawsuit was first filed by the states back in December, the Administrative Procedure Act governs the issuance of new rules and regulations by government agencies. It requires public notice and opportunities to comment before a substantive rule can be enacted and bars arbitrary or capricious actions by agencies.

From almost the very first page of the opinion, Judge Hanen recites the problems the states are experiencing because of the federal government’s refusal to enforce our immigration laws, which include “severe law enforcement problems” that “ha[ve] led and will lead to serious domestic security issues directly affecting their citizenry.” He specifically cites the kidnapping at gunpoint of a Brownsville, Texas university student by “a human trafficker a few miles from this Courthouse” who was “forced to transport the trafficker and an alien who had just crossed the border.”

The most crucial decision made by Judge Hanen in this early stage of the lawsuit is that, contrary to the Justice Department’s claim, the states are legally allowed to bring this lawsuit because they are going to suffer concrete, measurable costs from the Deferred Action for Parents of Americans and Lawful Permanent Residents program, that is to say, they have standing. For example, it will cost states millions of dollars in mandatory fees set by federal law when these states have to process additional driver’s licenses. The federal government had tried to argue these fees were “self-inflicted” because states could simply deny licenses to illegals–but based upon other cases the Department of Justice has brought, it is clear that the administration doesn’t want states like Arizona to be able to have that option. It’s a bit like Henry Ford’s sales pitch: “Any customer can have a car painted any color that he wants as long as it is black.”

As Hanen pointed out, “legalizing the presence of millions of people is a ‘virtually irreversible’ action once taken.”

Hanen points out further irony by citing a question from a Department of Homeland Security civics test for naturalization applicants. At the very same time the administration is asserting power over state driver’s licenses because of federal authority over immigration, the Department’s test tells applicants that one of the powers that “belong to the states” (not the federal government) is giving out driver’s licenses.

Hanen’s lengthy opinion provides an extensive, well-researched, well-written review of the history of the Obama administration’s actions in the immigration area and points out the many problems caused by its lack of enforcement and overriding of federal immigration law. Hanen agrees that Homeland Security does have discretion “in the manner in which it chooses to fulfill the expressed will of Congress” in federal immigration law. But it cannot “enact a program whereby it not only ignores the dictates of Congress, but actively acts to thwart them.” In fact, the Homeland Security secretary “is not just rewriting the laws; he is creating them from scratch.”

The states don’t disagree that the federal government has exclusive jurisdiction over immigration, but they argue “that the Government has abandoned its duty to enforce the law.” Hanen concludes that “this assertion cannot be disputed.” In fact, “if one had to formulate from scratch a fact pattern that exemplified the existence of standing due to federal abdication, one could not have crafted a better scenario.”

Although Judge Hanen did not issue a decision on the merits, he did issue an injunction because he found that the states were substantially likely to succeed on the merits of their claims when the case goes to trial. He also found they met the other three elements necessary for issuing an injunction: 1) a substantial threat that the states would suffer irreparable injury if the injunction were denied; 2) that the threatened injury outweighs any damage the injunction might cause the government; and 3) that the injunction will not disserve the public interest.

As Hanen pointed out, “legalizing the presence of millions of people is a ‘virtually irreversible’ action once taken.” Thus, an injunction is appropriate because “there are millions of dollars at stake in the form of unrecoverable costs to the States if [the Deferred Action for Parents of Americans and Lawful Permanent Residents program] is implemented and later found unlawful.”

What happens now? Judge Hanen ordered both sides to “meet and confer and formulate and file” with the court by Feb. 27 an agreed-upon schedule for how the case should proceed. The Justice Department will also no doubt file an emergency appeal with the Fifth Circuit Court of Appeals asking that the injunction be stayed (that is, thrown out). If that happens, it would put the case in the status of proceeding to trial while the amnesty plan is being implemented.

But there is no doubt that Judge Hanen understands the “importance of these issues to millions of individuals – indeed, in the abstract, to virtually every person in the United States.” Given “the serious constitutional issues at stake,” Hanen made it clear he is going to ensure that “each side has had an opportunity to make a complete presentation” before he issues a final decision.