The President discussed options during a dinner at the White House with Senate Minority Leader Charles Schumer, Democrat-New York, and House Minority Leader Nancy Pelosi, Democrat-California, that also included talks on tax reform, infrastructure and trade. Trump has showed signs of shifting strategy to cross the aisle and work with Democrats in the wake of the high-profile failures by Republicans to repeal the Affordable Care Act.

A possible alliance between Trump and the Democrats on immigration would represent a major political gamble for a President who made promises of tougher border control policies the centerpiece of his campaign and pledged to build a “big, beautiful wall” along the US-Mexico border. A majority of Republicans, especially in the House, have long opposed offering legal status, and a path to citizenship, to the nation's more than 11 million undocumented immigrants.

But Trump has vacillated over the fate of the younger immigrants, known as “dreamers,” who have lived in the country illegally since they were children. Under mounting pressure from the right, Trump moved two weeks ago to begin dismantling Deferred Action for Childhood Arrivals (DACA), an Obama-era programme that has allowed 690,000 dreamers to work and go to school without fear of deportation.

In announcing the decision, the president made clear that he expected Congress to pursue a plan to protect the DACA recipients, offering a six-month delay until their two-year work permits begin to expire in March.

In a statement, the White House described the meeting as “constructive” and said the administration “looks forward to continuing these conversations with leadership on both sides of the aisle.”

Congressional aides familiar with the exchange said that Trump and the party leaders agreed to move quickly on legislation to protect dreamers, though aides did not disclose whether they agreed that the goal should be for dreamers to eventually be offered a path to citizenship.

In a statement, Schumer and Pelosi said they 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.”

White House press secretary Sarah Huckabee Sanders confirmed that DACA and border security were discussed but she said excluding border wall funding from a package deal was “certainly not agree to.”

Earlier in the day, Trump held a bipartisan meeting with a group of House members. Afterward, several Democrats involved in those talks said the president also had made clear that he did not expect border wall funding to be included in a legislative deal on the dreamers.

“He said, the wall doesn't have to be necessary,” Representative Henry Cuellar, Democrat-Texas, told reporters at the White House. “He said we're going to add [wall funding] somewhere else... We've told him we don't want to tie this [together]. He said, 'DACA, we're going to do it early. We're going to do some kind of border security.' He brought up the wall. He said that doesn't have to be on this DACA bill.”

Democrats, and some Republicans, have resisted funding for a wall, saying such a structure is not worth the billions of dollars it would cost.

Senators Richard Durbin, Democrat-Illinois, and Lindsey Graham, Republican-South Carolina, have introduced legislation, called the Dream Act, that would offer dreamers a path to citizenship. The number of undocumented immigrants that would potentially be covered by that bill, however, is expected to be far larger than the number of those who have DACA protections, a prospect that would likely engender more Republican opposition.

Cuellar said that he told Trump the Dream Act has sufficient bipartisan support to pass and that the White House should be pushing for a vote. Trump, Cuellar said, told the group: “Oh, it will be on the floor.”

Even if the president and Democratic leaders claim to cut a deal, it will need the support of GOP leaders, who are already wary of the spending agreement Trump brokered with them last week.

Pelosi and House Speaker Paul Ryan, Republican-Wisconsin, met earlier Wednesday to begin discussing the broad parameters of the forthcoming immigration debate. Ryan's team signalled that despite the administration's eagerness to quickly seal the deal, it will take awhile.

Thousands march against Donald Trump in LGBT rights parade Show all 8 1 /8 Thousands march against Donald Trump in LGBT rights parade Thousands march against Donald Trump in LGBT rights parade A marcher hold a sign that reads "Love is Love is Love" on the National Mall with the Washington Monument in the background during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers unfurl a huge rainbow flag as they prepare to march in the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers gather to hear speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade Gil Mendez, of San Francisco, holds a sign to honor the victims of the shooting at the Pulse Nightclub in Orlando as he marches during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade An demonstrator looks on as LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher listens to speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher mugs for the camera during the Los Angeles LGBTQ #ResistMarch AP

AshLee Strong, Ryan's spokeswoman, said that regarding the plight of the dreamers, the speaker “reiterated that any solution needs to address border security and enforcement, which are the root causes of the problem. Discussions among the Republican conference will continue in the coming weeks.”

Ryan is already facing growing pressure from House conservatives who have begun to question his leadership and even floated names of possible replacement as speaker. An agreement between Trump and Democrats on a bill to protect dreamers could potentially put Ryan in the position of having to decide whether to bring it for a vote with the prospects that it might pass with more Democratic support than among the GOP.