A U.S. district judge in California refused Thursday to reinstate President Trump's sanctuary cities executive order, which would cut funding to cities that allowed undocumented immigrants to reside in them.

U.S. District Judge William Orrick originally blocked the order in a preliminary injunction in April, which was in response to lawsuits from San Francisco and Santa Clara.

Attorney General Jeff Session penned a memo in May, telling officials to follow a narrow interpretation of the executive order, and said jurisdictions that did not match his definition would not receive grants from the Justice Department or Department of Homeland Security.

Orrick said Sessions's memo did not "impact my prior conclusions that the Counties have standing, that their claims against the Executive Order are ripe, and that they are likely to succeed on the merits of those claims," according to court papers obtained by Politico.

Orrick's refusal to reverse the injunction marks another blow to Trump's immigration agenda, which looks to crack down on cities providing safe haven to undocumented immigrants.

Immigration and Customs Enforcement acting Director Thomas Homan said on Tuesday he plans on sending additional resources and agents to sanctuary cities in an effort to crack down on undocumented immigrants.