President Donald Trump taunted a federal judge and the liberal federal circuit that reviews his cases on Wednesday, saying a Supreme Court showdown was inevitable after his 'sanctuary city' crackdown was blocked.

'First the Ninth Circuit rules against the [travel] ban & now it hits again on sanctuary cities-both ridiculous rulings. See you in the Supreme Court!' the president said on Twitter, lashing out at U.S. District Judge William Orrick.

The swipe came hours after the White House slammed opponents of its immigration policies in the strongest terms yet, saying lawmakers who protect illegal-immigrant criminals have 'the blood of dead Americans on their hands.'

Trump wrote in a pair of tweets: 'Out of our very big country, with many choices, does everyone notice that both the "ban" case and now the "sanctuary" case is brought in the Ninth Circuit, which has a terrible record of being overturned (close to 80%). They used to call this "judge shopping!" Messy system.'

Orrick isn't technically part of the Ninth Circuit, which is an appeals court. He is a district court judge, which is one level down in the federal judicial system.

But at the top of the pyramid is the U.S. Supreme Court, where Trump successfully placed a new justice this month – restoring a conservative tilt that could ultimately decide the sanctuary city issue and a host of others.

The president's rhetoric has been unusually heated on the issue of whether states, counties and cities can effectively hide illegal immigrants from the feds when they arrest or sentence them.

Scroll down for video

Blasted: The Trump administration has lashed out at a San Francisco judge who blocked a ban on federal funding for sanctuary cities. Judge William Orrick (right), an Obama-era appointee, struck down the measure on Wednesday

President Donald Trump tweeted that he would ultimately prevail with his plan to withhold money from cities and counties that refuse to hand illegal-immigrant criminals over to federal immigration agents for deportation

Mayors and officials from the Major Cities Chiefs Association, including Tom Manger, chief of police in Montgomery County, Maryland (centre), met Jeff Sessions for discussions on sanctuary cities

In a lengthy statement released on Tuesday night by Trump's press secretary, Sean Spicer, the White House said Orrick's decision to block a ban on funding for sanctuary cities was 'a gift to criminal gangs and cartels.'

The statement cited the death of Kathryn 'Kate' Steinle, the 32-year-old woman shot dead by an illegal immigrant in Orrick's city of San Francisco in 2015. Trump invoked Steinle's name repeatedly during his presidential campaign to make the case that violent criminals who are in the U.S. illegally should be shown no mercy.

'San Francisco, and cities like it, are putting the well-being of criminal aliens before the safety of our citizens, and those city officials who authored these policies have the blood of dead Americans on their hands,' the statement read.

The furious criticism came after Orrick blocked an order allowing the federal government to withhold grant funding from communities that fail to cooperate with U.S. immigration authorities.

Orrick, ruling in a federal lawsuit, declared that the president had no authority to use an executive order to attach new conditions to federal spending.

The decision will stay in place while the lawsuit works its way through the courts.

The president has taken issue with the Ninth Circuit court's aggressive approach to his executive orders, saying correctly that it's America's most liberal circuit and that the Supreme Court overrules four out of every five of its cases that it reviews

'We'll go to the Supreme Court and win it there,' said Sean Spicer, the president's press secretary

Spicer described the decision as 'another blow' for 'the rule of law, as an unelected judge unilaterally rewrote immigration policy for our Nation.'

His statement went on to say cities that don't turn over their jailed criminals to immigration officials 'are engaged in the dangerous and unlawful nullification of Federal law in an attempt to erase our borders.'

'This decision occurred in the same sanctuary city that released the 5-time deported illegal immigrant who gunned down innocent Kate Steinle in her father's arms,' his statement said.

THE KILLING OF KATHRYN STEINLE The White House's incendiary rant makes reference to San Francisco murder victim 'Kate Steinle', in reference to Judge Orrick's ruling. Kathryn Steinle was shot dead on a pier in the city in 2015 by Juan Francisco Lopez-Sanchez, who had previously been deported from the US five times. Her father, Jim Steinle, attempted first aid but was unable to save her. She was 32 years old. Sanchez told police that he'd found the gun that killed Steinle wrapped in a T-shirt under a bench and that he had been trying to shoot seals. He said he was groggy after eating sleeping pills he found in a trash can, The gun had been stolen from a Bureau of Land Management vehicle the night before. Sanchez first entered the US in 1991 and was deported in 1994. In-between he had four felony drug convictions, including manufacturing narcotics. He then bounced in and out of the country and was deported for the final time in 2009. He re-entered the US three months later and was jailed. Sanchez was transferred on March 26, 2015, to San Francisco authorities on an outstanding drug warrant; they later released him as the warrant was out of date. ICE demanded they hand him over, but the San Francisco authorities refused and released him. Three months later he shot and killed Steinle. Kathryn Steinle (pictured) was shot dead in San Francisco in 2015 by Juan Francisco Lopez Sanchez, who had been deported from the US five times previously Advertisement

'San Francisco, and cities like it, are putting the well-being of criminal aliens before the safety of our citizens, and those city officials who authored these policies have the blood of dead Americans on their hands.

'This San Francisco judge's erroneous ruling is a gift to the criminal gang and cartel element in our country, empowering the worst kind of human trafficking and sex trafficking, and putting thousands of innocent lives at risk.'

Spicer's lengthy statement concluded by saying the White House was 'confident' that it would be vindicated by the Supreme Court, and that it would 'pursue all legal remedies to the sanctuary city threat that imperils our citizens.'

The press secretary appeared on the Fox news Channel in the mid-morning hours, saying that 'as it goes to the Supreme Court they will clearly rule that the president was well within his legal right to do this.'

'I think that anybody that's got a basic understanding of the Constitution and a basic reading of U.S. Code would come to the same conclusions. So we'll go through the process. And as the president noted, we'll go to the Supreme Court and win it there,' Spicer said.

The Trump administration disagreed with two California governments that sued over the order about its scope during a recent court hearing.

San Francisco and Santa Clara County argued that it threatened billions of dollars in federal funding for each of them, making it difficult to plan their budgets.

'It's not like it's just some small amount of money,' John Keker, an attorney for Santa Clara County, told Orrick – an Obama-era appointee to the federal bench – at an April 14 hearing.

Chad Readler, acting assistant attorney general, said the county and San Francisco were interpreting the executive order too broadly.

The funding cutoff applies to three Justice Department and Homeland Security Department grants that require complying with a federal law that local governments not block officials from providing people's immigration status, he said.

The order would affect less than $1 million in funding for Santa Clara County and possibly no money at all for San Francisco, Readler said.

Trump was using a 'bully pulpit' to 'encourage communities and states to comply with the law,' Readler said.

In his ruling, Orrick sided with San Francisco and Santa Clara, saying the order 'by its plain language, attempts to reach all federal grants, not merely the three mentioned at the hearing.'

'The rest of the order is broader still, addressing all federal funding,' Orrick said.

'And if there was doubt about the scope of the order, the president and attorney general have erased it with their public comments.'

He said: 'Federal funding that bears no meaningful relationship to immigration enforcement cannot be threatened merely because a jurisdiction chooses an immigration enforcement strategy of which the president disapproves.'

WHITE HOUSE STATEMENT IN FULL Today, the rule of law suffered another blow, as an unelected judge unilaterally rewrote immigration policy for our Nation. Federal law explicitly states that a Federal, State or Local government entity or official may not prohibit, or in any way restrict, any government entity or official from sending to, or receiving from, the Immigration and Naturalization Service information regarding the citizenship or immigration status, lawful or unlawful, of any individual. 8 U.S.C. 1373(a). That means, according to Congress, a city that prohibits its officials from providing information to federal immigration authorities - a sanctuary city - is violating the law. Sanctuary cities, like San Francisco, block their jails from turning over criminal aliens to Federal authorities for deportation. These cities are engaged in the dangerous and unlawful nullification of Federal law in an attempt to erase our borders. Once again, a single district judge - this time in San Francisco - has ignored Federal immigration law to set a new immigration policy for the entire country. This decision occurred in the same sanctuary city that released the 5-time deported illegal immigrant who gunned down innocent Kate Steinle in her father's arms. San Francisco, and cities like it, are putting the well-being of criminal aliens before the safety of our citizens, and those city officials who authored these policies have the blood of dead Americans on their hands. This San Francisco judge's erroneous ruling is a gift to the criminal gang and cartel element in our country, empowering the worst kind of human trafficking and sex trafficking, and putting thousands of innocent lives at risk. This case is yet one more example of egregious overreach by a single, unelected district judge. Todays [sic] ruling undermines faith in our legal system and raises serious questions about circuit shopping. But we are confident we will ultimately prevail in the Supreme Court, just as we will prevail in our lawful efforts to impose immigration restrictions necessary to keep terrorists out of the United States. In the meantime, we will pursue all legal remedies to the sanctuary city threat that imperils our citizens, and continue our efforts to ramp up enforcement to remove the criminal and gang element from our country. Ultimately, this is a fight between sovereignty and open borders, between the rule of law and lawlessness, and between hardworking Americans and those who would undermine their safety and freedom. Advertisement

The Trump administration says sanctuary cities allow dangerous criminals back on the street and that the order is needed to keep the country safe.

San Francisco and other sanctuary cities say turning local police into immigration officers erodes trust that's needed to get people to report crime.

The order also has led to lawsuits by Seattle; two Massachusetts cities, Lawrence and Chelsea; and a third San Francisco Bay Area government, the city of Richmond. The San Francisco and Santa Clara County suits were the first to get a hearing before a judge.

San Francisco and the county argued in court documents that the president did not have the authority to set conditions on the allocation of federal funds and could not force local officials to enforce federal immigration law.

They also said Trump's order applied to local governments that didn't detain immigrants for possible deportation in response to federal requests, not just those that refused to provide people's immigration status.

The Department of Justice responded that the city and county's lawsuits were premature because decisions about withholding funds and what local governments qualified as sanctuary cities had yet to be made.

The sanctuary city order was among a flurry of immigration measures Trump has signed since taking office in January, including a ban on travelers from seven Muslim-majority countries and a directive calling for a wall on the border with Mexico.

A judge from the 9th Circuit blocked the initial travel ban from seven Muslim-majority countries, and appeal judges from the circuit also ruled against it.

Trump suggested breaking up the circuit and said that it was notoriously liberal.

Sanctuary cities have become increasingly contentious, with Attorney General Jeff Sessions issuing harsh criticism last week of cities including New York which generally refuse to cooperate with immigration authorities.

Taking a tough line: Jeff Sessions, the attorney general, sent nine jurisdictions letters on Friday warning they would lose key grant money unless they document cooperation with immigration authorities

The Trump administration has suggested that cities, counties or states which prohibit law enforcement from cooperating with federal immigration authorities would lose federal funding.

Mayors from some of the cities affected met Sessions on Tuesday but emerged from the meeting saying they remain confused about how to prove their police aren't prohibited from cooperating with immigration authorities - a requirement for the money.

The Justice Department has warned some jurisdictions that they could lose some law enforcement grant money if they don't prove their local police and sheriffs are able to share information with federal immigration authorities about the citizenship status of people in their custody.

Sessions has labeled cities that bar such information-sharing as 'sanctuary cities.'

'We want all jurisdictions to enthusiastically support the laws of the United States that require the removal of criminal aliens, as many jurisdictions already do,' Sessions said in a statement released after the meeting with representatives of the U.S. Conference of Mayors.

But the officials who met with Sessions said practical questions remain about how to follow the rules.

For example, does that mean a sheriff's department must tell Immigration and Customs Enforcement (ICE) about an inmate's incarceration by phone?

Or will an inmate's fingerprint information, taken by the jail and then shared with the FBI and ICE, be enough? And how long can a local jail hold someone for immigration authorities without violating their rights?

'We got more clarity than we've ever received, but we also have other thorny issues to sort through,' said Jorge Elorza, the mayor of Providence, Rhode Island, after the hour-long meeting.

It was the first time the delegation of mayors met with Sessions since the department sent nine jurisdictions letters on Friday warning they would lose key grant money unless they document cooperation with immigration authorities.

The jurisdictions, which include the state of California and major cities like Chicago, New York and Philadelphia, were places the Justice Department's inspector general previously identified as having barriers to information-sharing among local police and immigration officials. Some disputed they met the 'sanctuary city' title.

New Orleans Mayor Mitch Landrieu, whose city received one of the letters, said he provided Sessions with proof of compliance during Tuesday's meeting but remained stunned the city received a warning in the first place, as it drafted its policies in consultation with federal immigration and Homeland Security officials.

The delegation also included mayors from Columbia, South Carolina; Gary, Indiana; and Austin, Texas. The meeting touched on a number of other concerns related to the Trump administration's immigration policies they said remain confusing.

On a number of immigration issues, 'we hear very different messages from (Homeland Security), DOJ and also the White House,' Elorza said. 'Just give us clarity and please have one, clear policy so we can know where we stand.'