WASHINGTON ― Democrats say they are now in a far stronger position to protect young undocumented immigrants after President Donald Trump unexpectedly agreed to their demands in debt ceiling and government spending negotiations during a meeting at the White House on Wednesday.

Trump sided with House Minority Leader Nancy Pelosi (D-Calif.) and Senate Minority Leader Chuck Schumer (D-N.Y.) Wednesday by accepting a plan to keep the government funded and to increase the government’s borrowing limit for another three months. GOP congressional leaders at the meeting, as well as Trump’s own treasury secretary, wanted a longer period for the debt limit extension.

Instead of siding with the leaders of his own party, Trump gave Pelosi and Schumer what they wanted.

Democrats hope that the same situation will play out again. Republicans often need votes from across the aisle to raise the debt ceiling, because many conservatives oppose increasing the government’s borrowing limit without spending cuts to decrease the deficit. With a shorter-term debt ceiling hike coming up in December at the same time as a government funding fight, Democrats will have more leverage in the budget battle.

Some Democrats also believe it strengthens their hand with the Dream Act, a bill that would give legal status to young undocumented immigrants who came to the U.S. as children. They said they will use the leverage they have on the debt ceiling to press for their priorities, with the immigration legislation high on that list.

“If a clean Dream Act does not come to the floor in September, we’re prepared to attach it to other items this fall until it passes,” Schumer said at a press conference Wednesday morning.

“Clearing the deck for these things, it allows us to focus on [this legislation]. I think the only way this will ever happen is with a full-on campaign and public pressure on Republicans,” added a Democratic congressional staffer.

The Dream Act was first introduced 16 years ago, but there’s increased urgency now, after the president announced on Tuesday that he’d be ending the Deferred Action for Childhood Arrivals program. Without DACA, hundreds of thousands of so-called “Dreamers” could begin to lose work permits and potentially be detained.

To keep it from happening, Democrats need Republicans, but they also need Trump, and some are hoping his comments and actions on Wednesday are a positive sign.

Trump said Wednesday that he thinks he and other Republicans can make a deal with Democrats on Dreamers.

“I really believe Congress wants to take care of it,” Trump said of protections for Dreamers. “We discussed that also today, and Chuck and Nancy would like to see something happen, and so do I. And I said if we can get something to happen, we’re going to sign it and we’re going to make a lot of happy people.”

But Trump is notoriously fickle. He did, after all, promise during the campaign to end DACA on “day one” of his presidency. So Democrats are still wary.

“The president told America last week that he loved the Dreamers and then this week made clear that he wants to deport them, so it’s getting tougher to tell what he really thinks,” a senior Democratic aide said. “Ultimately, we need him to sign bipartisan legislation to give permanent legal status to these young people.”

Another Democratic Hill staffer said that the deal on Wednesday “deflates some of the momentum” built up after Trump’s DACA announcement and will make it harder to pass the Dream Act in September. Whether it can happen in December, when the big fights will be up again, may largely depend on pressure from activists.

“Congress likes to kick decisions down the road and hope the pressure subsides so they don’t have to do anything,” the staffer wrote in an email to HuffPost. “I don’t think the DREAMers will allow that strategy to work. DACA may not be a crisis for very many Members of Congress, but it is a crisis for DREAMers and they aren’t going to rest.”

Jim Manley, who served for decades as a top aide to former Senate Majority Leader Harry Reid (D-Nev.), said that another trip-up for Democrats could be Republicans demanding votes on their own immigration legislation for the next few months.

“There are no free shots in the Senate, so unless a deal is tightly structured with everybody on board, simply trying to pass the Dream Act in the Senate will lead to Republicans demanding a vote on every bad immigration idea imaginable in return,” Manley said.