SAN FRANCISCO (CN) – A federal judge on Wednesday refused to lift an injunction blocking part of President Donald Trump’s executive order authorizing the withholding of federal funds from cities that refuse to help enforce immigration laws.

The Justice Department asked U.S. District Judge William Orrick III to reconsider his injunction after Attorney General Jeff Sessions issued a memo on May 22 limiting the scope of grant funds at risk.

“The fundamental problem I see is, as found in my initial order, Section 9 of the executive order is unconstitutional,” Orrick said in court on Wednesday. “The attorney general’s memo can’t change that.”

Only two sets of grants issued by the Justice and Homeland Security departments would be withheld from jurisdictions that “willfully refuse” to comply with 8 U.S. Code § 1373, which requires local governments to place no restrictions on sharing an individual’s immigration status with federal authorities, according to the memo.

“The attorney general would still have the ability to change the memo,” Orrick said, adding the president could also replace Sessions with a new attorney general that adopts a different interpretation of the executive order.

Orrick rejected arguments offered by Justice Department attorney Brett Shumate, who said the need for an injunction no longer exists because San Francisco and Santa Clara County no longer face budget uncertainty with billions of dollars at stake.

“As of today, they’re not harmed,” Shumate said. “We haven’t designated any jurisdictions as sanctuary jurisdictions.”

But San Francisco Deputy City Attorney Mollie Lee argued the city still feels insecure about its federal grants, especially after Sessions delivered a speech in Las Vegas Wednesday morning criticizing San Francisco and other cities for their policies.

“Public statements leave real fear and real cause for concern among sanctuary jurisdictions,” Lee said.

Attorneys for San Francisco and Santa Clara County also urged the judge to deny the Justice Department’s motions to dismiss their lawsuits on Wednesday.

Orrick said he addressed most key arguments raised in those motions in his April 25 injunction ruling, adding he is not likely to change his thinking on those issues.

Shumate also asked the judge to clarify how his injunction impacts conditions placed on future, rather than existing, grants. He said the ruling “puts a cloud” over the executive branch’s grant-making authority. Orrick said he would consider that request.

San Francisco was the first city to sue Trump on Jan. 31, six days after the newly sworn-in president issued his executive order on sanctuary cities. Santa Clara County followed with another suit against the president on Feb. 3.

Last month, the House of Representatives passed two bills that would increase penalties for immigrants who re-enter the United States illegally and strip federal funds from sanctuary cities. Both bills require Senate approval.

Sessions cited the passage of those bills in a Wednesday morning speech to local, state and federal law enforcement officials in Las Vegas.

The attorney general said cities like Philadelphia, Boston and San Francisco that advertise themselves as “sanctuary cities” have more violent crime on average than those that don’t, according to a study by the University of California, Riverside.

However, researchers who conducted that study told their student newspaper there was no “statistically significant” change in crime for cities that adopted sanctuary policies, according to UCR Today.

“Some 300 jurisdictions in this country refuse to cooperate with federal immigration authorities regarding illegal aliens who commit crimes – even MS-13 gang members,” Sessions said in his speech Wednesday. “These jurisdictions are protecting criminals rather than their law-abiding residents.”

San Francisco and Santa Clara County say their communities are safer when immigrants can report crimes without fear of deportation, and that efforts to make them change their policies through funding cuts are an attack on local sovereignty.