Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Donald Trump and congressional Democrats appeared to move closer to an agreement to extend protections for so-called Dreamers on Wednesday night, and Democratic leaders said Trump agreed not to push for a border wall as part of that deal.

Dropping the demand for a border wall could make it easier for Republicans and Democrats to reach a deal on DACA, the Deferred Action for Childhood Arrivals, which protects undocumented immigrants brought into the country as children.

But a key detail of an agreement, first announced by Senate Minority Leader Chuck Schumer and House Minority Leader Nancy Pelosi after a dinner with the president, quickly became a matter of dispute.

The Democratic leaders said it included an agreement "to work out a package of border security, excluding the wall, that's acceptable to both sides."

White House Press Secretary Sarah Huckabee Sanders said on Twitter: "While DACA and border security were both discussed, excluding the wall was certainly not agreed to."

Earlier Wednesday, White House legislative affairs director Marc Short told an industry trade group that the border wall does not have to be a part of an agreement on DACA, one attendee at the meeting said.

The Trump administration announced last week that the Obama-era program would end in six months. Trump said as part of the announcement that "I am not going to just cut DACA off, but rather provide a window of opportunity for Congress to finally act."

Ending DACA could affect as many as an estimated 800,000 people. The program allows undocumented immigrants brought to the United States as children to remain and get work permits in the country.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Sources told NBC News that Schumer and Pelosi told Trump they are prepared to deliver votes on a measure that would pair the existing DREAM Act bill text with additional border security that does not include the border wall funding. Specifics on what type and level of border security were not disclosed.

The DREAM Act would have offered those who came to the U.S. illegally as children the opportunity to potentially gain permanent legal residency. The act was first introduced in August 2001 by Sen. Orin Hatch, R-Utah, and Dick Durbin, D-Ill. It has resurfaced several times, always failing to get through Congress.

Related: What Is DACA? What You Need to Know About the Program

Pelosi and Schumer said in the joint statement: “We had a very productive meeting at the White House with the President. The discussion focused on 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.”

Sources said "the president wants this done fast" referring to a resolution to the DACA program. Moving anything requires the Republican leadership to push any bills to a vote.

While DACA and border security were both discussed, excluding the wall was certainly not agreed to. — Sarah Sanders (@PressSec) September 14, 2017

After Huckabee Sanders' tweet, a spokesman for Schumer said on Twitter: "The President made clear he would continue pushing the wall, just not as part of this agreement."

House Speaker Paul Ryan, R-Wisc., suggested last week that the issue could be tied to Trump’s pledge for a wall on the U.S.-Mexico border.

"It's only reasonable and fitting that we also address the root cause of the problem, which is borders that are not sufficiently controlled while we address this very real and very human problem that's right in front of us," Ryan said on Sept. 6.

Some criticized the reported agreement.

Republican Rep. Steve King of Iowa, referring to a tweet about the agreement by the Associated Press, said on Twitter "If AP is correct, Trump base is blown up, destroyed, irreparable, and disillusioned beyond repair. No promise is credible."

Republican Sen. Jeff Flake of Arizona tweeted his support to Trump "for pursuing agreement that will protect #Dreamers from deportation."

A White House official said Wednesday night that "President Donald Trump had a constructive working dinner with Senate and House Minority Leaders, Chuck Schumer and Nancy Pelosi as well as Administration officials to discuss policy and legislative priorities," which included DACA.

"This is a positive step toward the President's strong commitment to bipartisan solutions for the issues most important to all Americans," the White House official said. "The Administration looks forward to continuing these conversations with leadership on both sides of the aisle."

If an agreement on DACA was struck, it would be the latest instance of Trump reaching across the aisle to Democrats in search of a legislative acheivement.

The president struck a deal with Schumer and Pelosi last week that combines disaster aid for those affected by Hurricane Harvey with measures to keep the government open and extend the debt ceiling for three months. Some Republicans were left upset at that deal.

Trump signed the $15 billion disaster relief package into law on Friday.