Representative Nancy Pelosi of California and Senator Chuck Schumer of New York, the Democratic leaders.

WASHINGTON — Democratic leaders on Wednesday night declared that they had a deal with President Trump to quickly extend protections for young undocumented immigrants and to finalize a border security package that does not include the president’s proposed wall.

The Democrats, Senator Chuck Schumer and Representative Nancy Pelosi, said in a joint statement that they had a “very productive” dinner meeting with the president at the White House that focused on the program known as Deferred Action for Childhood Arrivals, or DACA. “We agreed to enshrine the protections of DACA into law quickly, and to work out a package of border security, excluding the wall, that’s acceptable to both sides,” they said.

In its own statement, the White House was far more muted, mentioning DACA as merely one of several issues that were discussed, including tax reform and infrastructure. It called the meeting, which came a week after the president struck a stunning spending-and-debt deal with the Democratic leaders, “a positive step toward the president’s strong commitment to bipartisan solutions.”

But the bipartisan comity appeared to have its limits. In a tweet, Sarah Huckabee Sanders, the White House press secretary, disputed the Democrats’ characterization of Mr. Trump’s stance on the border wall. “While DACA and border security were both discussed, excluding the wall was certainly not agreed to,” she wrote.

Mr. Schumer’s communications director, Matt House, fired back on Twitter: “The President made clear he would continue pushing the wall, just not as part of this agreement.”

While Democratic leaders sought to frame the Wednesday dinner as a victory for their priorities, Republican votes will be needed for any immigration overhaul. Hard-liners in Congress were flummoxed by word of a potential deal on DACA, one that could push some of Mr. Trump’s electoral base away from him.

Representative Steve King, Republican of Iowa, wrote on Twitter that if the reports were true, “Trump base is blown up, destroyed, irreparable, and disillusioned beyond repair. No promise is credible.” The website Breitbart, run by Mr. Trump’s former chief strategist, Stephen K. Bannon, had the headline “Amnesty Don.”

Some Republicans were more receptive. Senator Jeff Flake of Arizona, a frequent critic of the president, said on Twitter: “Kudos to @POTUS for pursuing agreement that will protect #Dreamers from deportation.” The young immigrants are often referred to as Dreamers.

The dinner was a follow-up to a meeting that Mr. Schumer and Ms. Pelosi had with the president in the Oval Office last week, during which Mr. Trump agreed to the Democrats’ proposal for a vote on a debt-ceiling increase and a government funding measure that also included a Hurricane Harvey aid package.

While the two top Republican congressional leaders, Senator Mitch McConnell and Speaker Paul D. Ryan, attended that meeting, they were absent from the Wednesday night dinner.

A total of 11 people were seated at the table in the Blue Room of…