Washington • President Donald Trump on Thursday said he was “fairly close” to a deal with congressional leaders to preserve protections for young immigrants living illegally in America, and is insisting on “massive border security” as part of any agreement.

Trump, speaking to reporters before surveying hurricane damage in Florida, pushed back against Democratic leaders who claimed there was a deal on the Deferred Action for Childhood Arrivals (DACA) initiative. He also said his promised wall along the U.S.-Mexico border would “come later.”

“We’re working on a plan subject to getting massive border controls. We’re working on a plan for DACA. People want to see that happen,” Trump said. He added: ”‘I think we’re fairly close but we have to get massive border security.”

Trump, in a series of early morning tweets, had contradicted the characterization of a private White House dinner on Wednesday night by his guests, Sen. Chuck Schumer of New York and Rep. Nancy Pelosi of California, the top Democrats on Capitol Hill. Trump denied there was a deal.

No deal was made last night on DACA. Massive border security would have to be agreed to in exchange for consent. Would be subject to vote. — Donald J. Trump (@realDonaldTrump) September 14, 2017

The WALL, which is already under construction in the form of new renovation of old and existing fences and walls, will continue to be built. — Donald J. Trump (@realDonaldTrump) September 14, 2017

Does anybody really want to throw out good, educated and accomplished young people who have jobs, some serving in the military? Really!..... — Donald J. Trump (@realDonaldTrump) September 14, 2017

...They have been in our country for many years through no fault of their own - brought in by parents at young age. Plus BIG border security — Donald J. Trump (@realDonaldTrump) September 14, 2017

Schumer and Pelosi said in a statement after that get-together that they had agreed to “enshrine the protections of DACA into law quickly” and to work out a package on border security, excluding Trump’s planned border wall.

Not so, shot back White House press secretary Sarah Huckabee Sanders, who said that “while DACA and border security were both discussed, excluding the wall was certainly not agreed to.”

Trump’s tweets prompted a fresh response from Schumer and Pelosi, who said his words were “not inconsistent with the agreement reached last night,” and that while there was “no final deal,” the president had said he would “support enshrining DACA protections into law, and encourage the House and Senate to act.”

They said in a statement that the details on border security needed to be negotiated, that both sides agreed “the wall would not be any part of this agreement” and that Trump said he would pursue the wall later.

And soon after, Trump appeared to confirm that approach. “The wall will come later, we’re right now renovating large sections of wall, massive sections, making it brand new,” he told reporters before his Florida trip.

He also said Republican congressional leaders, House Speaker Paul Ryan of Wisconsin and Senate Majority Leader Mitch McConnell of Kentucky favored his approach on the immigration program. “Ryan and McConnell agree with us on DACA,” Trump said, adding that he had spoken to them by telephone.

It was a head-snapping turn of events for a president inclined recently to turn to Democrats to jump-start legislative imperatives. Only days ago, Trump and the Democratic leaders agreed to back a three-month extension of the debt limit in order to speed hurricane assistance.

“The WALL, which is already under construction in the form of new renovation of old and existing fences and walls, will continue to be built,” Trump tweeted early Thursday.

At the same time, he expressed sympathy for the hundreds of thousands of younger immigrants vulnerable to deportation even though they were brought to the United States as toddlers or children. He had announced last week that his administration was rescinding the program and gave Congress six months to come up with a legislative fix.

“Does anybody really want to throw out good, educated and accomplished young people who have jobs, some serving in the military, really?” Trump wrote. “They have been in our country for many years through no fault of their own - brought in by parents at a young age. Plus BIG border security.”

Pelosi spokesman Drew Hammill had said after the White House dinner “the president was clear he would press for the wall but separate from this agreement.”

Either way, it was the second time in two weeks that Trump cut out Republicans to reach a deal with Pelosi and Schumer. A person briefed on the meeting, who spoke on condition anonymity about the private get-together, said the deal specifies bipartisan legislation that would provide eventual citizenship for the young immigrants.

House Republicans would normally rebel over such an approach, which many view as amnesty for lawbreakers. It remains to be seen how conservatives’ loyalty to Trump would affect their response to a policy they would have opposed under other circumstances.

The House’s foremost immigration hard-liner, GOP Rep. Steve King of Iowa, made clear that he was not happy.

Addressing Trump over Twitter, King wrote that if the reports were true, “Trump base is blown up, destroyed, irreparable, and disillusioned beyond repair. No promise is credible.” Breitbart News, an influential publication among Trump’s base of supporters, referred to the president in a headline as “Amnesty Don.”

Earlier Wednesday, during a White House meeting with moderate House members from both parties, Trump had urged lawmakers to come up with a bipartisan solution.

The president said he would be open to separating the wall issue from the question of the younger immigrants, as long as the wall got dealt with eventually.

House Speaker Paul Ryan, in an Associated Press interview Wednesday, said “kicking these 800,000 kids out to countries that they’ve probably not been to since they were toddlers, in countries that speak languages they may not even know, is not in our nation’s interest.”

Added Ryan, R-Wis.: “So I do believe that there’s got to be a solution to this problem.”

Trump, deeply disappointed by Republicans’ failure to make good on years of promises to repeal the Obama-era health law, infuriated many in his party last week when he reached a three-month deal with Schumer and Pelosi to raise the debt ceiling, keep the government running and speed relief to states affected by recent hurricanes.

“More and more we’re trying to work things out together,” Trump said Wednesday, calling the development a “positive thing” for both parties.

“If you look at some of the greatest legislation ever passed, it was done on a bipartisan manner. And so that’s what we’re going to give a shot,” he said.