President Donald Trump and Democratic leaders in the US Congress have agreed to work together on legislation to protect "Dreamers," the illegal immigrants who were children when they entered the United States, the lawmakers said, although a dispute erupted over exactly what had been agreed.

Following a dinner with Trump at the White House, Senate Democratic leader Chuck Schumer and House of Representatives Democratic leader Nancy Pelosi said the "productive meeting" focused on "DACA," a program established by former President Barack Obama.

"We agreed to enshrine the protections of DACA (Deferred Action for Childhood Arrivals) into law quickly, and to work out a package of border security, excluding the wall, that's acceptable to both sides," Schumer and Pelosi said in a statement.

All year, Democrats have insisted that they will block any legislation that contains funding for a wall along the length of the US border with Mexico, a top Trump campaign goal that many Republicans in Congress also do not support.

While White House officials have suggested legislation on DACA could move forward without wall funding, White House spokeswoman Sarah Sanders disputed the characterisation that a deal had been reached to leave it out of any legislation focused on the Dreamers.

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

Throughout his 2016 campaign for president and since taking office in January, Trump has demanded the construction of a wall to keep out illegal immigrants and drugs. He initially said Mexico would pay for the wall but has requested money from the US Congress after the government of Mexico refused to pay.

The dinner was the latest effort in a new initiative by Trump to work with opposition party Democrats on major legislation.

Trump canceled Obama's DACA program in which about 800,000 undocumented young people have escaped the threat of deportation and been able to apply for work permits in the United States

Following the dinner, a White House official said the president, Schumer and Pelosi discussed tax reform, immigration, border security, infrastructure investments and trade as part of Trump's bid to reach out to Democrats.

"The administration looks forward to continuing these conversations with leadership on both sides of the aisle," the official said.

Using his executive powers, Trump canceled Obama's DACA program in which about 800,000 undocumented young people have escaped the threat of deportation and been able to apply for work permits in the United States. Trump argued that Obama over-stepped his authority in creating the program.

But Trump gave Congress six months to come up with a replacement program in the form of legislation to be enacted into law.

Democratic Representative Henry Cuellar, who attended a White House meeting with Trump earlier on Wednesday, told reporters the president said he would not insist on wall funding as part of a Dreamers bill, but would pursue it on other, future legislation.

Cuellar said Trump urged lawmakers to link a Republican bill to cut legal immigration to the United States with protections for Dreamers. But many Democrats oppose lowering the cap on annual legal immigration.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.