The Department of Justice has sent a letter to Seattle, King County, and other so-called sanctuary cities saying some immigration policies might violate federal law and that could jeopardize federal grants.

The letter went to 29 cities, counties, and states. It tells Seattle and King County officials to submit a joint response by Dec. 8.

The Justice Department has threatened to cut off millions of dollars in federal grants to cities if they don't meet certain criteria for cooperating with immigration officials.

Seattle's current and next mayor had pointed responses to the letter.

"This action is both immoral and illegal," Mayor-elect Jenny Durkan said in a statement. "It threatens the safety not just of our immigrant families but of all of Seattle which relies on the police resources they seek to cut. Unfortunately for the Trump administration, multiple federal judges have ruled that the Department of Justice cannot withholding federal law enforcement aid to sanctuary cities. Seattle is and will continue to be a Sanctuary City, and our City will fight Trump every step of the way against these illegal attempts to withhold funds. I'll say it again: Jeff Sessions and Donald Trump keep your hands off Seattle."

"Now, the Trump Administration is threatening to withdraw federal grant money from Seattle that is used to fund the work of three civilian crime prevention specialists in our police department," Mayor Tim Burgess said in a statement. "These prevention specialists work with people throughout the city and give advice on how to avoid being a crime victim, how to report crimes that do occur, and how to take proactive steps to improve the physical environment to reduce crime. It's ironic that a president who says he wants to reduce crime and help crime victims works to remove funding from programs that do exactly that.

"Today's letter is more bluster and bullying by the president based on his ideologically driven fixation on immigrants and refugees," Burgess added.

A federal judge on Wednesday blocked the government from withholding a major grant from Philadelphia -- a self-declared sanctuary city." The Justice Department argued cities that don't help enforce federal immigration laws are endangering public safety.

The Associated Press contributed to this report.