WASHINGTON  U.S. Sen. Robert Menendez, who took to the Senate floor during the campaign to criticize Donald Trump‘s position on immigration, blasted the new president for threatening to remove federal funding from cities protecting unauthorized immigrants within their borders.

Trump on Wednesday signed executive orders to cut off federal funds “except as mandated by law” from municipalities that do not help enforce immigration laws, to hire 5,000 additional Border Patrol agents, and to build a wall along the U.S.-Mexico border, which he insisted during the campaign that Mexico would pay for.

“This is a terrible and ugly decision by a president who is more concerned with right-wing fringe movements than doing what’s right for all of America, for the economy, and for the future of this country,” Menendez (D-N.J.) said. “President Trump is only cementing his place on the wrong side of common-sense, political realism and our American history.”

N.J. cities prepare to defy Trump

Gov. Chris Christie, a Trump adviser and former presidential candidate, supported the Republican president’s move.

“Nothing I can do about the sanctuary cities here,” Christie said on his monthly call-in radio show Wednesday. “I agree with him. I took that same position when I ran for president. Elected officials can’t be allowed to pick and choose which laws they choose to comply with.”

Leaders of several New Jersey cities, including Newark and Jersey City, have said they will continue to protect undocumented immigrants within their borders, while East Orange and Maplewood passed sanctuary city laws after Trump was elected.

“We are deeply committed to protecting all of our residents in New Jersey, citizens and immigrants alike, who weave the vibrant web of diversity that we value in our communities and of which we are immensely proud as the most diverse state in the nation,” said state Sen. Nilsa Cruz-Perez (D-Camden).

Trump indicated he would seek to penalize those municipalities.

“Sanctuary jurisdictions across the United States willfully violate federal law in an attempt to shield aliens from removal from the United States,” Trump said in the order. “These jurisdictions have caused immeasurable harm to the American people and to the very fabric of our republic.”

U.S. Rep. Frank Pallone Jr. (D-6th Dist.), the top Democrat on the House Energy and Commerce Committee, said he would work to protect New Jersey’s municipalities against the threat of losing federal funds.

“It is shameful for President Trump to target the cities he is sworn to defend and by extension the people he is sworn to serve,” Pallone said.

The Anti-Defamation League, which criticized Trump during his campaign for using anti-Semitic memes, said the president was endangering immigrants by his actions.

“Forcing cities to choose between losing funds — or dividing police and immigrant communities — is wrong and dangerous,” chief executive Jonathan Greenblatt said. “When immigrants and their families and communities fear police, they become vulnerable to hate crimes. This executive order would create an underclass of people who do not have open access to police protection if they become victims.”

The U.S. Conference of Mayors and Major Cities Chiefs Association took exception to Trump’s threat to take away federal funds to cities that do not comply with his orders.

In a statement, they cited a U.S. Supreme Court ruling that federal officials may not deny funds to force cities to comply with their policies. That’s the ruling that gave states the option under the Affordable Care Act to either expand coverage under Medicaid or reject the federal funds.

U.S. Sen. Cory Booker (D-N.J.) said he learned as mayor of Newark that “using local police to detain suspected undocumented immigrants who committed nonviolent crimes wasted our limited resources, distracted officers from fighting serious crimes, and chilled residents’ cooperation with law enforcement.”

State Sen. Sandra Cunningham (D-Hudson) said she would stand up for the immigrants in her district.

“We are richer because of our diversity, and I will help to make sure the immigrants who call America and my district home have a voice,” she said.

During the campaign, Trump promised to deport all 11 million unauthorized immigrants, including those brought to the U.S. as children and parents of American citizens who have been protected under two executive orders signed by President Barack Obama. Trump has yet to revoke those orders.

Menendez was part of a bipartisan group of senators who succeeded in winning approval in his chamber of legislation to strengthen border security and offer a path to citizenship for unauthorized immigrants, only to see the House Republican leadership refuse to bring up the bill for a vote.

Instead, the GOP-controlled House in 2015 passed legislation penalizing cities that refuse to cooperate with federal immigration officials, such as not detaining undocumented immigrants when asked to. Similar efforts in the Senate were blocked by a Democratic filibuster.

Such municipalities faced the loss of community development block grants, community policing grants and other federal funds under the legislation.

Democratic lawmakers said Congress needed to resume efforts to overhaul the immigration system.

“Congress must work together, in a bipartisan manner, to pass comprehensive immigration reform that includes a process that requires those immigrants living outside the law to become legal citizens, learn English, pay taxes, and pass criminal background checks,” said Rep. Albio Sires (D-8th Dist.).

NJ Advance Media staff writer Brent Johnson contributed to this report.

Jonathan D. Salant may be reached at jsalant@njadvancemedia.com. Follow him on Twitter @JDSalant. Find NJ.com Politics on Facebook.