Yesterday, a federal district court in Texas issued an injunction against the implementation of President Obama’s unilateral executive actions on immigration. The order will temporarily prevent the issuance of work permits and Social Security numbers to four to five million people illegally in the United States. Agree or disagree with the president’s actions, the court ruled correctly.

While the injunction certainly has wider implications for immigration reform, DHS funding, and those here illegally, it is also sound policy. The upshot of the court’s lengthy analysis is that by implementing the expansion of Deferred Action for Childhood Arrivals (DACA) and Deferred Action for Parents of Americans (DAPA) via policy memorandum, the federal government ignored the Administrative Procedures Act.

Enacted in 1946, the APA requires that the public receive notice of any “agency statement of general or particular applicability and future effect designed to implement, interpret, or prescribe law or policy,” have the opportunity to comment on the proposed changes for at least 30 days, and then again be given notice of the final rule. If the rule was improperly promulgated, those who can show harm may sue to stop it.

The APA is good government in action. It creates a regular process for new actions by the government and allows those actions to be challenged when improper. It has been used routinely against overreaching regulators who would seek to expand their power beyond what the statute or the Constitution allows.

The Obama administration, however, claims that it is exempt from the APA because DAPA and DACA are not policy changes, but “guidance” for executive branch officials on how it will enforce current rules. The court found this argument “disingenuous” and concluded that DAPA “clearly represents a substantive change in immigration policy… Far from being mere advice or guidance, this Court finds that DAPA confers discrete obligations (based on detailed criteria) upon those charged with enforcing it.” This conclusion is undoubtedly correct. Indeed, the court quoted the president himself calling the actions a “change in the law.”

Although it is important in this case, the decision has broader implications. Immigration attorneys and businesses have rightly complained for years that the administration is constantly changing immigration rules and processing standards without notice and public comment. In February of last year, for example, Citizenship and Immigration Services issued a memo that overturned nearly 20 years of asylum law, tightening standards for asylum claims with no notice or opportunity for public comment. In another action unaccompanied by a public memo let alone a formal rulemaking, the Obama administration altered H-1B and L-1 application standards, leading to soaring rates of denial and requests for evidence.

Similar examples abound. Immigration agencies, including the U.S. Citizenship and Immigration Services, the Department of Labor, Border Patrol, and others, have for too long changed the rules of the game without following proper procedure. Hopefully, this decision will force them to revaluate their position and rein in future excesses.