WASHINGTON — President Trump has asked state and local officials to publicly praise Immigration and Customs Enforcement officers, calling efforts to abolish the agency “dangerous.”

In a letter issued Monday, Trump asked public officials to applaud the “sacrifice” of ICE officers as well as Customs and Border Protection agents.

“Through letters, public statements, op-eds, resolutions, and events, we can give our voice to our Nation’s longstanding tradition of honoring the public servants who protect our communities and our way of life,” Trump wrote.

He said he wrote the letter because ICE has become a political punching bag, with a number of likely Democratic 2020 hopefuls — including Sens. Elizabeth Warren (D-Mass.) and Kirsten Gillibrand (D-N.Y.) — urging that the agency be abolished.

“Tragically, the brave men and women of ICE have recently been subjected to a nationwide campaign of smears, insults, and attacks by politicians shamelessly catering to the extreme elements of our society that desire lawlessness and anarchy,” Trump said in the letter.

“These horrendous assaults are no-doubt spurred on by the dangerous ‘Abolish ICE’ movement – a movement to abolish our borders entirely,” the president said.

Trump referenced protests against ICE in Portland, Oregon — in which the protesters had the backing of the city’s mayor — and in Louisville, Kentucky.

“Yet, while anarchist protesters hurl vicious insults at ICE officers in Portland and other disturbing episodes nationwide, those same ICE officers continue to dutifully remove some of the most dangerous and violent individuals from the communities they protect – putting their lives on the line in the process,” Trump said.

The president said that in fiscal year 2017, ICE arrested more than 125,000 “aliens” with criminal records. He also pointed out how immigration enforcement plays a part in keeping the US safe post-9/11.

“We also must not forget the important role that ICE and CBP play in preventing terrorism,” the president said. “The attacks were carried out by foreign nationals who exploited our lax immigration laws and defrauded our immigration system in order to murder nearly 3,000 innocent people.”

Trump was hosting an event later in the day, a “Salute to the Heroes of the Immigration and Customs Enforcement and Customs and Border Protection,” at the White House.

He’s invited ICE officers, CBP agents and politicians, including Arizona Gov. Doug Ducey, Sen. David Perdue (R-Ga.) and Alabama Attorney General Steve Marshall, to take part.