New York City is joining Seattle and Portland, Ore., to file a complaint against the Trump administration in a Seattle court on Thursday over the administration labeling them as "jurisdictions that permit anarchy," which could affect the cities' federal funding.

"It’s morally wrong, it’s legally unacceptable, it’s unconstitutional and we’re going to fight it," New York City Mayor Bill de Blasio, a Democrat, said at a press conference on Thursday. "I said weeks ago if the Trump administration persisted in trying to illegally take away funding from New York City we would take them to court, and we will beat them in court."

DE BLASIO'S DESCENT: HOW NEW YORK CITY'S MAYOR BECAME SO UNPOPULAR ACROSS THE POLITICAL SPECTRUM

"We did see them taking more and more moves that might have had an impact on funding, and that was the appropriate trigger for legal action," de Blasio added.

In this Aug. 19, 2020, file photo, New York Mayor Bill de Blasio speaks to reporters after visiting New Bridges Elementary School in the Brooklyn borough of New York, to observe pandemic-related safety procedures. (AP Photo/John Minchillo, File)

New York City's chief lawyer, Jim Johnson, who also spoke at the press conference, said that the administration has "actually taken this anarchist designation and started to include it in applications for federal grants."

In September, the Department of Justice identified New York City, Portland and Seattle as "local governments that are permitting anarchy, violence, and destruction in American cities" after rioting in some areas of the country.

"When state and local leaders impede their own law enforcement officers and agencies from doing their jobs, it endangers innocent citizens who deserve to be protected, including those who are trying to peacefully assemble and protest," Attorney General Bill Barr said in a statement.

ARTIST BLASTS 'SELECTIVE ENFORCEMENT' AFTER NYC ORDERS REMOVAL OF PRO-POLICE ARTWORK

“We cannot allow federal tax dollars to be wasted when the safety of the citizenry hangs in the balance," Barr's statement continued. "It is my hope that the cities identified by the Department of Justice today will reverse course and become serious about performing the basic function of government and start protecting their own citizens."

IN this July 28, 2020, file photo, Attorney General William Barr appears before a House Judiciary Committee hearing on the oversight of the Department of Justice on Capitol Hill in Washington. (Chip Somodevilla/Pool via AP)

In a memo to the attorney general and the White House budget director, President Trump called for a review of all federal funds provided to the three cities plus Washington, D.C., saying, “it is imperative that the federal government review the use of federal funds by jurisdictions that permit anarchy, violence, and destruction in America's cities.”

Both peaceful protests against police brutality and rioting have occurred in New York City, Seattle, Portland and Washington, D.C., since the death of George Floyd in late May.

CLICK HERE FOR THE FOX NEWS APP 

“My administration will not allow federal tax dollars to fund cities that allow themselves to deteriorate into lawless zones,” Trump wrote in the memo.

Fox News' Tyler Olson and Alex Pappas contributed to this report.