Senior Democrats say they have reached a deal with Donald Trump to protect thousands of undocumented immigrants to the US from deportation.

The agreement, announced by Senate Democratic Leader Chuck Schumer and House Democratic Leader Nancy Pelosi, also includes funding for border security measures, excluding Mr Trump's planned Mexico border wall.

The apparent deal enshrines protections for some 800,000 immigrants who were brought into the US illegally as young children by their parents.

Often referred to as "Dreamers", they benefited from former President Barack Obama's Deferred Action for Childhood Arrivals programme (DACA), which provided temporary work permits and protection from deportation.

Mr Trump scrapped the DACA initiative earlier this month, but the president's bipartisan deal offers Dreamers a reprieve.

Ms Pelosi and Mr Schumer said in a joint statement: "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."

Sarah Huckabee Sanders, the White House press secretary, partially disputed their characterisation of the deal, saying over Twitter that excluding the controversial border wall "was certainly not agreed to".

Pelosi spokesman Drew Hammill gave an alternative take on that saying "the president was clear he would press for the wall but separate from this agreement".

The deal could anger Mr Trump's support base as many view a deal on DACA as an amnesty for law-breakers.

But it also has significance as it marks the latest incident of Mr Trump casting aside his party to make a deal with Democrats.

Although the president has railed against "obstructionist" Democrats in the past, he has recently shown himself more open to bipartisanship, largely following on from the the failure of Republicans to work with Democrats to find an alternative to Obamacare.