U.S. District Court Judge Andrew Hanen didn’t put an end to the White House’s new immigration rules, but he did ensure that the road to implementation will be fraught with obstacles.

Under Deferred Action for Parents of Americans and Lawful Permanent Residents, or DAPA, some 5 million immigrants could be safe from deportation for three years, gain work authorization during that period, obtain Social Security numbers and driver’s licenses, and take advantage of the earned income tax credit. But on February 16 Judge Hanen, ruling in a case brought by Texas and several other states, decided that the policy could not be put into practice because it was issued in violation of the Administrative Procedure Act, which requires that the administration publish its rules in the Federal Register. He thus issued a temporary injunction on procedural grounds. The states argued that the president lacked constitutional authority to issue DAPA and that the rule burdened them with extra expenses, giving them standing to sue.

Judge Hanen avoided ruling on the full merits of the states’ claim, but he didn’t merely punt on the constitutional questions. “Do the laws of the United States, including the Constitution, give the Secretary of Homeland Security the power to take the action at issue in this case?” he asked. His doubtful answer likely pleased the states’ attorneys general, and it may serve as a blueprint for their continuing legal action, with appeal now underway. Should a future court take up the merits of the case, the White House will be hard pressed to answer the constitutional challenge. And if Judge Hanen’s constitutional skepticism is warranted, not only will the order be revoked, but the president, by encouraging illegal immigrants to register with the Department of Homeland Security (DHS), may also have placed those immigrants at greater risk of deportation.

If a federal judge is right, not only will the president’s new policy likely be revoked, but immigrants may face greater risk of deportation.

In a memorandum issued on November 20 last year, DHS Secretary Jeh Johnson claimed that DAPA was legal because it did not establish a pathway to citizenship, which only Congress could do. He said the executive branch possessed prosecutorial discretion allowing it to defer deportation of aliens within the DAPA category.

But the plaintiffs argued that DAPA constituted a significant change in immigration law that was not authorized by Congress, that only Congress can create or change federal laws, and that DAPA contravened Article II of the Constitution, which provides that the president “shall take Care that the Laws be faithfully executed.” In the view of Judge Hanen, the government had abdicated this responsibility. “Failure to secure the border has exacerbated illegal immigration into the country,” he wrote, and “significantly drains the States’ resources.” While the states concede that border security and immigration law are federal matters, the judge agreed that the federal government, through deferral, would not simply be doing a poor job following the law, but rather would dispense with it entirely: DAPA “does not represent mere inadequacy; it is complete abdication,” he wrote. In other words, the states are within their rights to complain that deferral is not just a routine federal law enforcement decision but in fact a violation of Article II.

Judge Hanen did not deny the executive branch an opportunity for discretion, but he disputed the claim that only discretion was at work. Instead of merely refusing to enforce the Immigration and Naturalization Act’s removal laws against individuals, DHS has, the Judge wrote, “enacted a wide-reaching program that awards legal presence to individuals Congress has deemed deportable or removable, as well as the ability to obtain Social Security numbers, work authorization, and the ability to travel.” Exercising prosecutorial discretion, he asserted, “does not also entail bestowing benefits.” The judge doubted that the Supreme Court would allow non-enforcement decisions to “include the affirmative act of bestowing multiple, otherwise unattainable benefits upon an individual.”

The administration surely knew this was coming. For years President Obama responded to demands for deportation deferral by explaining that he was not a king and could not make law on his own. In ordering DAPA, he exercised power that he repeatedly said he lacked. Indeed, Judge Hanen noted that President Obama announced, “It was the failure of Congress to pass such a law that prompted him (through his delegate, Secretary Johnson) to ‘change the law.’” In a memo justifying DAPA, the administration’s own Office of Legal Counsel gave Judge Hanen ample ammunition: “The Executive cannot, under the guise of exercising enforcement discretion, attempt to effectively rewrite the laws to match its policy preferences,” the memo read. But the Judge went further, writing that Secretary Johnson “is not just rewriting the laws; he is creating them from scratch.”

The administration can expect to face these constitutional arguments again as the case moves forward. In the meantime, the decision to issue the rules and thereby enter in a lengthy process of litigation may turn out badly for illegal immigrants who hoped that President Obama’s initiative would benefit them.

In a televised speech delivered the same day Secretary Johnson published his memo, the president urged eligible immigrants to take advantage of DAPA:

If you have children who are American citizens . . . if you’ve taken responsibility, you’ve registered, undergone a background check, you’re paying taxes, and you’ve been here for five years, you’ve got roots in the community—you’re not going to be deported . . . . If you meet the criteria, you can come out of the shadows.

Even before Judge Hanen’s decision, it was risky for illegal immigrants to register with the government under DAPA and undergo background checks. In return, successful applicants would not face deportation, but the announced deferral period of three years was always in doubt because the next president could rescind Obama’s policy, providing less than two years of safety. With protracted litigation, that period could be cut even more.

As long as Judge Hanen’s injunction is in place, promised benefits will not materialize. However, should individuals—despite the injunction—accept the invitation to register, “there may be dire consequences for them if DAPA is later found to be illegal or unconstitutional,” the judge wrote. DHS, whether under the current administration or the next, “will then have all pertinent identifying information for these immigrants and could deport them.” Under these conditions, why come out of the shadows?

The president likely thought DAPA a moral good. He thought it would lead to better lives for immigrants and their families. At the same time, it would offer political advantage, helping his fellow Democrats maintain allegiance from the growing population of Latino voters. But by seeking shortcuts around the law, President Obama has endangered the gift he hoped to confer.