SEATTLE -- A lawsuit was filed by Seattle on Wednesday over President Trump’s executive order that threatens to withhold federal funds from communities that refuse to cooperate with efforts to find and deport immigrants in the country illegally.

Mayor Ed Murray said the order issued in January punishing “sanctuary cities” is unconstitutional and creates uncertainty around the city’s budget.

Other governments have sued Trump over the sanctuary issue. San Francisco filed a lawsuit earlier this year, also saying the order was unconstitutional. California’s Santa Clara County and two Massachusetts cities with large Latino populations -- Chelsea and Lawrence -- have also taken legal action.

Get Breaking News Delivered to Your Inbox

California Attorney General Xavier Becerra issued an amicus brief Wednesday on behalf of San Francisco supporting its challenge against Mr. Trump.

“Threatening to take away resources from sheriffs and police officers in order to promote misguided views on federal immigration policy is reckless and puts public safety at risk,” Becerra said. “It is the right and responsibility of California and each state under the Constitution to determine how it will provide for the safety and general welfare of its residents and to safeguard their constitutional rights. We will not be intimidated or coerced into compromising our state values on account of the Trump Administration’s fear mongering and falsehoods.”

Justice Department spokesman Ian Prior said in a statement that “the American people want and deserve a lawful immigration system that keeps us safe and serves our national interest” and that the federal government will enforce relevant laws.

Attorney General Jeff Sessions reiterated this week that the Justice Department would deny grant money to cities that violate a federal law dealing with information-sharing among local police and federal authorities. Sessions said the cities are making their communities unsafe.

Murray challenged that claim.

“Apparently the Trump administration, their war on facts has now become a war on cities,” Murray said during a news conference. “Let me be clear about the facts. We are not breaking any laws and we are prioritizing safety.”

Under the order, Seattle could face at least $10.5 million in cuts to public safety programs, he said.

Trump’s order violates the constitution by trying to make local law enforcement enforce federal immigration law, Murray said.

The order also makes communities less safe by forcing people underground, said City Attorney Pete Holmes.

When people are marginalized and made to fear police, they are less likely to come forward as witnesses to crime, Murray said.

The lawsuit filed in U.S. District Court asks a judge to declare that Seattle is in compliance with the law and that the executive order is unconstitutional under the 10th Amendment and the Spending Clause of the U.S. Constitution.

“This administration has created an atmosphere of anxiety in cities across America and has created chaos in our politics,” Murray said. “It is time for cities to stand up and ask the courts to put an end to the anxiety in our communities and the chaos in our system.”