Advocates post comments in support of legislation to protect foreign-born “dreamers” during a rally in Los Angeles. (Frederic J. Brown/AFP/Getty Images)

President Trump on Tuesday again called attention to the raging controversy over foreign-born “dreamers” who came to the United States without documentation as children, highlighting a federal judge’s decision affirming the administration’s authority to end an Obama-era program that protected such people from deportation.

“Federal Judge in Maryland has just ruled that ‘President Trump has the right to end DACA,’ ” Trump wrote in an 8:46 a.m. tweet. “President Obama had 8 years to fix this problem, and didn’t. I am waiting for the Dems, they are running for the hills!”

The president was referencing a ruling issued Monday by U.S. District Judge Roger W. Titus, who was appointed to the federal bench in Maryland by President George W. Bush. The ruling came in a case brought by the advocacy organization CASA de Maryland.

Titus’s decision, indeed, affirmed that Trump’s administration had the authority to wind down the Deferred Action for Childhood Arrivals (DACA) program, which granted dreamers a reprieve from deportation. The judge also affirmed the administration had not acted in a legally incorrect way when it decided the program might be susceptible to court challenges and, thus, should be phased out.

Titus criticized Trump for his “unfortunate and often inflammatory rhetoric” and noted that, were he not a judge constrained to interpreting the law, he would opt for a different result.

“An overwhelming percentage of Americans support protections for ‘Dreamers,’ yet it is not the province of the judiciary to provide legislative or executive actions when those entrusted with those responsibilities fail to act,” Titus wrote, adding later, “This Court does not like the outcome of this case, but is constrained by its constitutionally limited role to the result that it has reached. Hopefully, the Congress and the President will finally get their job done.”

CASA Executive Director Gustavo Torres said in a statement: “The judiciary is the last line of defense for the Dreamers and we still hope we can depend on the courts to save our young people from deportations. With the lack of action from Congress and the President’s decision to cancel the program with no solution in place, we see the judiciary branch as our last hope.”

The Trump administration had hoped to end DACA on March 5, though federal district judges in California and New York already had issued nationwide injunctions stopping it from doing so — making the date effectively meaningless. Late last month, the Supreme Court turned down a request to get involved in the dispute at this time, though it could still step in after the cases make their way through the appeals process.

Titus’s ruling does not disturb the earlier injunctions, though he unequivocally disagreed with them. The other judges had decided Trump had not offered legally sufficient reasons for ending DACA.

Titus wrote that the president’s decision “was premised on a legitimate belief that DACA was unlawful and should be wound down in an orderly manner, while giving Congress a window to act and adopt an appropriate legislative solution.”

“The Administrative Record — the basis from which the Court must make its judicial review — does not support the notion that it was targeting a subset of the immigrant population, and it does not support any supposition that the decision was derived on a racial animus,” the judge wrote.

Leon Fresco, an immigration lawyer at Holland & Knight who worked in the Obama Justice Department, said the ruling would have “zero practical effect except for providing a new case for citation” for the Justice Department and appeals court judges who might side with Trump.

Titus also notably took aim at Congress for inaction both before and after DACA was conceived. He wrote that former president Barack Obama’s administration had ordered the program only when “faced with the reality that Congress could do little more than squabble regarding the dreamers,” and he noted, “with 87 percent of Americans favoring some sort of DACA-esque protections,” legislators should act now.

Titus did offer some protection for dreamers, stopping the government from using DACA recipients’ information against them for enforcement purposes, such as deportation. Those involved in the program had to apply for protected status, and many feared the Trump administration would use the information to find and deport them once DACA was terminated.