WASHINGTON - President Donald Trump said Thursday he was “fairly close” to finalizing a deal with Democrats allowing young immigrants to remain in the United States, antagonizing anti-immigration Republicans who worry he is violating his own campaign pledges.

“You have 800,000 young people, brought here, no fault of their own. So we’re working on a plan,” Trump said, hours after he hosted a working dinner with top congressional Democrats in which they discussed securing the border in exchange for protections for immigrants known as “Dreamers.”

Trump’s embrace of a key Democratic argument for allowing young people to stay after they arrived illegally in the United States as children was the latest stiff-arm by Trump against his own party, some of whose rank-and-file members have bridled at the president’s apparent eagerness to strike deals with the opposition.

“Amnesty Don,” blared a headline on Breitbart News, a far-right website run by former chief White House strategist Steve Bannon, which slammed Trump for apparently selling out his base by protecting Dreamers from deportation.

Trump’s predecessor Barack Obama protected them through his Deferred Action for Childhood Arrivals (DACA) executive order. Trump rescinded that order, prompting jubilation among many in his camp, but then urged Congress to craft a legal solution within the next six months.

Democratic Senate Minority Leader Chuck Schumer and House of Representatives top Democrat Nancy Pelosi sounded optimistic about their meeting.

No final deal had been reached, they said, but “we agreed that the President would support enshrining DACA protections into law, and encourage the House and Senate to act,” they said in a joint statement.

Negotiators will need to hash out details of border security that could include the use of drones, air support and new technology including sensors, with a mutual goal of “finalizing all details as soon as possible,” the Democrats added.

They also said no funding for Trump’s long-promised wall on the US-Mexico border would be in the DACA deal.

But while Democrats oppose wall funding, the president stressed that “the wall is going to be built and it will be funded later.”

As the DACA discussion swirled, it appeared Trump and his White House were not on the same page.

“We are not looking at citizenship. We are not looking at amnesty” of DACA immigrants, Trump said in Florida, where he was surveying the aftermath of Hurricane Irma.

But a White House spokeswoman, Lindsay Walters, said the administration was considering a path to immigration reform “that could include legal citizenship over a period of time.”

The working dinner was the second time in a week that Trump huddled with Democrats. Last week, in a move that vexed Republican conservatives, he struck a deal with Democrats on bundling hurricane relief with raising the debt ceiling and extending government funding.

Trump’s apparent willingness to work with Democrats “Chuck and Nancy” rather than his own party’s leaders who control Congress, and his repeated attacks on Republicans, has fueled suggestions he is striking out on his own, all too willing to leave his party in the dust.

“Frankly, this is still a reality show president” who thrives on good reviews, John Hudak, a senior fellow at the Brookings Institution, told AFP.

“He found that when he’s worked with Democrats, he has gotten better reviews, better ratings,” he added. “He seems inclined to continue doing that.”

House Speaker Paul Ryan has expressed support for legalizing the Dreamers, but insisted Thursday that negotiations had yet to begin.

“These were discussions, not negotiations,” he said of Trump’s talks with Pelosi and Schumer. “There isn’t an agreement.”

The issue has struck a chord with Trump’s core supporters, many of whom expected the president to hold the line on immigration.

“At this point, who DOESN’T want Trump impeached?” tweeted Ann Coulter, a firebrand conservative commentator who launched a series of broadsides against the president.

If reports of Trump’s DACA deal are correct, the “Trump base is blown up, destroyed, irreparable, and disillusioned beyond repair. No promise is credible,” House Republican Steve King, a fierce anti-immigration advocate, said on Twitter.

Even prior to the DACA dealmaking, Trump signaled an independent streak not seen in a US president in generations.

He has hammered Republicans for failing to repeal the Affordable Care Act, sacked his chief of staff Reince Priebus - a powerful former party boss - and warned Republican lawmakers he will oppose their re-election if they defy his populist agenda.