Image copyright Reuters Image caption DACA supporters at a protest rally in San Diego, California

Top US Democrats say they have agreed to reach a deal with President Donald Trump to protect thousands of young undocumented migrants from deportation.

Nancy Pelosi and Chuck Schumer said they also agreed to work on a border security package that would exclude Mr Trump's proposed wall with Mexico.

However, the White House denied the wall had been excluded from proposals.

Mr Trump scrapped the Deferred Action for Childhood Arrivals (Daca) programme earlier this month.

The Obama-era Daca scheme was put in place to protect so-called "Dreamers" - migrants brought to the US illegally as children - from deportation.

The measures, which protect some 800,000 people in the US, also provide temporary permits for work and study.

Mr Trump announced on 4 September he would cancel the scheme, while giving Congress six months to enact a replacement plan for Daca recipients.

Following talks over dinner at the White House, House Minority Leader Nancy Pelosi and Senate Minority Leader Chuck Schumer said: "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."

Image copyright Getty Images Image caption Chuck Schumer (speaking) and Nancy Pelosi (left) have fought Trump's decision to phase out the Daca scheme

Media playback is unsupported on your device Media caption 'America is the only country I've known'

Democrats have repeatedly said that they will block any legislation that contains funding for the border wall - a key campaign pledge of Mr Trump's.

A White House statement was more muted, simply saying that there had been a "constructive working dinner" where tax reform, border security and Daca had been discussed.

White House spokeswoman Sarah Sanders later disputed the Democrats' account.

"While Daca and border security were both discussed, excluding the wall was certainly not agreed to," she wrote on Twitter.

Mr Schumer's aide replied: "The President made clear he would continue pushing the wall, just not as part of this agreement."

Republican support would be needed in any immigration legislation, as they have a majority in both the House and the Senate.

More hardline Republicans shared their frustrations over the deal - among them House of Representatives member Steve King of Iowa. He tweeted at the president that if the reports were true, "Trump base is blown up, destroyed, irreparable, and disillusioned beyond repair. No promise is credible."

Pro-Trump Fox News host Sean Hannity appeared dismayed, tweeting, "weak Republicans have betrayed voters" - they "wanted [Trump] to fail" and had "pushed him into arms of political suicide".

The right-wing website Breitbart, run by Mr Trump's former chief strategist Steve Bannon, ran the headline, "Amnesty Don" and accused the president of "a full-fledged cave".

Breitbart was among his fiercest critics last week when Mr Trump stunned fellow Republicans by making a deal with the Democrats to extend the US debt limit and extend the current budget to 8 December.

It said the move "jacks up debt, punts the agenda, snubs GOP [Republicans]".

Media playback is unsupported on your device Media caption The US president said he had "great love" for Daca Dreamers

What is Daca?

The Deferred Action for Childhood Arrivals (Daca) programme - scrapped earlier in September - was created in 2012 by then President Barack Obama, to shield children of undocumented immigrants from deportation.

It also provided work and study permits for those it covered - popularly known as "dreamers".

In order to qualify for Daca, applicants under the age of 30 were required to submit personal information to the Department of Homeland Security, including addresses and phone numbers.

They had to pass an FBI background check, have a clean criminal background, and either be in school, recently graduated or have been honourably discharged from the military.

In exchange, the US government agreed to "defer" any action on their immigration status for a period of two years.

The majority of dreamers are from Mexico and other Latin American countries.

The justice department has said no current Daca recipients will be affected by the decision to scrap the scheme before 5 March 2018, but no new applications will be taken.