Mayor Joseph A. Curtatone of Somerville said the city risks losing $6 million in federal funding because officials have vowed to welcome all immigrants, regardless of their legal status. The mayor also issued an executive order called the Trust Act, which shields immigrants with minor or no criminal records from possible deportation.

President-elect Donald Trump has said that on his first day in office he will halt all federal funding to sanctuary cities such as Somerville, Chelsea, and Boston, potentially costing the cities millions in aid. But officials in those cities have said they won’t change course in the face of the threat.


He urged Trump to reconsider his threats and said Somerville would maintain its principles at any cost. The federal funds are roughly 3 percent of the city’s budget.

“We are not going to stand voiceless and in silence and let a Gestapo-like atmosphere be cultivated in this nation and come to our communities and break families apart,” he said. “That will not be tolerated.”

Curtatone also tweeted a public statement to his constituents: “Somerville will stand by you.”

Mayor Martin J. Walsh of Boston said he also would support all residents, regardless of their immigration status. Boston, where the City Council passed a Trust Act in 2014 that was signed into law by Walsh, receives about $250 million annually in federal funding. Walsh said if Trump withholds those funds it would be “disastrous,” but he vowed to fight anyway.

“We will push back,” Walsh said. “I’ll go to Congress. I’ll go to the Senate. I’ll go to the president and tell him the disruption he’s going to cause to the country,” Walsh said.

Boston City Councilor Josh Zakim, who sponsored the Trust Act, acknowledged that neither the council nor the mayor have the power to stop the US government from cracking down on undocumented immigrants.


“But what we can do, what we have done . . . is to say the city of Boston government and resources are not going to be used to vilify a certain population based on national election results,’’ he said. “That’s not who we are as Bostonians.”

Steve Annear of the Globe staff contributed to this report. Maria Sacchetti can be reached at maria.sacchetti@globe.com. Follow her on Twitter @mariasacchetti. Meghan E. Irons can be reached at meghan.irons@globe.com. Follow her on Twitter @meghanirons.