WASHINGTON — President Donald Trump's base voters didn't like it when he beat a retreat on the policy of separating undocumented families at the border. And they were so dead set against "amnesty" provisions in a House immigration bill he backed that he later falsely claimed that he had never lobbied on it.

Overall, Trump has lost so far on his core immigration promises: to build a border wall, force Mexico to pay for it and vastly reduce both legal and illegal migration to the country.

But his allies say he's found a huge political winner, for the midterm elections and his 2020 re-election bid, in the call by some prominent Democrats to "abolish ICE" — the acronym for the U.S. Immigration and Customs Enforcement agency.

"There’s long been division in the Republican Party on the issue of immigration, but the one thing everyone can agree on is the Democrats are crazy for wanting to abolish ICE," said a former Trump White House official who spoke to NBC on the condition of anonymity to discuss the president's strategy.

That helps explain why Trump is turning the fight over detention-policy into a full-blown war over ICE.

From the Trumpworld perspective, it's an easy branding exercise: Democrats are for getting rid of an agency that cracks down on undocumented immigrants; which makes them in favor of open borders; and, in turn, that means they are generally for lawlessness.

Better yet, for Trump, the faces of the policy are Democrats who are widely considered potential 2020 rivals to him, including Sens. Kirsten Gillibrand of New York, Elizabeth Warren of Massachusetts and, to a slightly lesser extent because she hasn't directly called for an end to the agency, Kamala Harris, D-Calif. They're raising their voices just as he is ramping up a barnstorming tour in advance of the midterm elections that is a not-so-dry run for his re-election campaign.

And, best of all for Trump, they did the branding for him. "Abolish ICE" isn't his phrase; it's theirs.

"He has taken the abolish ICE thing, he’s wrapping it around the necks of the Democrats and he views it as his blunt instrument to defeat the Democrats in 2018 and whoever they put up in 2020," the former White House official said. "No doubt about it."

It's not just Trump's campaign that is pushing the issue. The official White House Twitter account slammed Warren and Harris on Monday for their statements on immigration, and the administration is pushing out stories about ICE's law enforcement work.

Today, DHS, @CBP, and @ICEgov will be sharing stories of the brave men and women who put their lives on the line every day with the sole objective of protecting our nation. Make sure to follow to see stories that have not been widely reported. — Homeland Security (@DHSgov) July 2, 2018

That's coming from a president who has spent much of his time in office trying to undermine the credibility of the FBI, the Justice Department, the National Security Agency and other federal national security and criminal justice agencies.

While it's not yet clear how the public will react to the abolish ICE fight, there's little doubt that Trump is happier waging it than talking about the policy of separating families or his failure, so far, to build the border wall or stop illegal immigration. And it's equally evident that Democratic leaders thinking about the midterms, rather than the 2020 presidential primary, are wary of being portrayed as opponents of a law enforcement agency.

Now, it's the divisions between Democratic leaders and their political base that are on display, not the Republican schism over Trump's policies that led the House to reject two GOP-written immigration bills in recent weeks.

Most congressional Democrats, including Senate Minority Leader Chuck Schumer, D-N.Y., have kept their distance from the "abolish ICE" calls being made by their colleagues and party activists. And, for the most part, those who favor getting rid of the agency are careful to say they want to put something in its place.