Federal judges in New York, Texas and California sided against two of the Trump administration’s key immigration initiatives Friday, the latest in a series of lower court rulings against the president’s push for new physical and administrative barriers to migrants.

In El Paso, the court ruled the Trump administration’s attempt to reprogram military funds for the construction of border fencing was a violation of appropriation laws, a decision that could freeze work on the barrier in that area.

And in separate rulings in New York, California and Washington state, judges partly blocked the implementation of the “public charge” rule that aimed to disqualify immigrants from receiving green cards if they use public benefits or the government considers them likely to do so.

The decisions were the latest setbacks to the administration’s broader attempt to tighten the legal immigration system at the same time the president is seeking to erect hundreds of miles of towering steel barriers along the Mexico border using billions of dollars diverted from military budgets.

In the western district of Texas, U.S. Judge David Briones sided with the plaintiffs — El Paso County and the Border Network for Human Rights — and gave them 10 days to file a proposal for a preliminary injunction. Briones, a Clinton appointee, denied the Trump administration’s motion to dismiss the lawsuit, which was filed in April.

The decision Friday is the first instance of a local jurisdiction successfully suing to block construction of Trump’s border barrier. El Paso County authorities argued it would inflict harm to the local community’s reputation by creating an impression the city is dangerous and unwelcoming.

David Bookbinder, an attorney for the plaintiffs, called it a “nice, neat, small ruling” that avoided broader constitutional questions about the president’s authority. The ruling instead zeroed in on what the judge said were violations that exceeded the executive branch’s authority to divert money appropriated by Congress for a specific purpose.

Bookbinder said it would take his clients “a few days” to determine what government activity they will seek to halt. The injunction likely would extend beyond El Paso County into areas of New Mexico, he said.

“It’s going to be a question of geography,” he said. “We’re going to have to specifically describe the areas of the border where the president will not be able to construct the wall.”

Trump this year diverted $3.6 billion in military construction funds to pay for hundreds of miles of 30-foot-tall steel bollard fencing. The administration has built 71 miles of new barriers so far, but Trump has promised to complete nearly 500 miles by the end of next year.

El Paso County Attorney Joanne Bernal said the county commissioners took a potentially risky step in suing the president, but said the action was necessary because his portrayal of the border as a dangerous area was damaging the economy and other important aspects of community life.

“You have the president of the United States declaring a national emergency, and we can look outside and see that there’s no national emergency,” Bernal said.

At a meeting last month led by Jared Kushner, administration officials discussed a plan to reprogram another $3.6 billion in Pentagon money if lawmakers do not provide funds for the barriers through the appropriations process.

The Trump administration is expected to appeal the ruling. The Department of Justice did not immediately respond to a request for comment.

In New York, Judge George B. Daniels blocked the Trump administration’s “public charge” rule, calling it “unlawful, arbitrary and capricious.” A 93-page ruling in the Northern District of California rejected the government’s arguments on similar grounds, though with a more geographically limited scope.

Ken Cuccinelli, the acting director of U.S. Citizenship and Immigration Services, which was preparing to implement the public charge rule this month, suggested the government would appeal.

“An objective judiciary will see that this rule lies squarely within long-held existing law,” he said in a statement. “Long-standing federal law requires aliens to rely on their own capabilities and the resources of their families, sponsors, and private organizations in their communities to succeed. The public charge regulation defines this long-standing law to ensure those seeking to come or stay in the United States can support themselves financially and will not rely on public benefits.”

U.S. immigration laws have long held provisions allowing the government to bar immigrants who are considered at risk of becoming dependent on public support, but the Trump administration’s initiative would expand the types of benefits that could be taken into consideration, including Medicaid, food assistance and federal housing vouchers.

Immigrant advocates and officials in several jurisdictions have claimed the measures have had a chilling effect even before their implementation, discouraging families from seeking medical care, shelter and food.

New York Attorney General Letita James, one of the plaintiffs suing the government, celebrated the ruling. “Once again, the courts have thwarted the Trump administration’s attempts to enact rules that violate both our laws and our values, sending a loud and clear message that they cannot rewrite our story to meet their agenda,” she said in a statement.

Robert Moore in El Paso contributed to this report.