President Trump speaks in the White House Rose Garden on Nov. 2. (Alex Brandon/AP)

President Trump told Republican senators Thursday not to allow a solution addressing the legal status of “dreamers” to be a part of a must-pass year-end spending bill, raising the stakes for year-end negotiations that could force a government shutdown or finally resolve an emotionally fraught element of immigration policy.

Democrats are threatening to withhold support for spending legislation that needs to be passed by Dec. 9 unless Congress passes legal protections for hundreds of thousands of children of undocumented immigrants who have benefited from an Obama-era program temporarily protecting them from deportation. In recent weeks, Democrats have pushed for an up-or-down vote on the Dream Act, a bill with bipartisan support that would grant dreamers permanent legal protections and set many of them on a years-long path to U.S. citizenship.

If a vote isn’t held, many Democrats are threatening to withhold their votes for the spending legislation. That’s not an empty threat, based on recent history. Republican leaders for years have relied on Democrats to help approve spending bills when dozens of fiscal conservatives have withheld support over spending levels.

Trump announced in December that he will end the Deferred Action for Childhood Arrivals program in March, giving Congress six months to approve plans to protect or deport the hundreds of thousands of young people benefiting from the program.

His request Thursday to keep the issue out of spending legislation could set up a high-stakes spending showdown in early December if GOP leaders don’t take up immigration legislation beforehand.

Sen. David Perdue (R-Ga.), who attended the meeting, said that Trump “would prefer it not to be part of a year-ending grand bargain of any sort, that it should be debated on its own merit.”

Trump has vacillated on immigration issues throughout the year — vowing to build a wall along the U.S.-Mexico border before reneging under pressure from his own party; calling for passage of conservative immigration proposals that would limit legal migration but then meeting with top Democratic leaders and vowing to work with them on bipartisan solutions.

But when pressed to clarify Trump’s requests, Perdue said the president was insistent.

“Do you know this president? He made it very clear what he wants. He does not want to see it in any form of year-end bill. He was emphatic about that,” Perdue said.

The Thursday morning meeting also included Senate Majority Whip John Cornyn (R-Tex.), Senate Judiciary Committee Chairman Charles E. Grassley (R-Iowa) and Sens. Tom Cotton (R-Ark.), Lindsey O. Graham (R-S.C.), James Lankford (R-Okla.) and Thom Tillis (R-N.C.).

Trump said the dreamers issue shouldn’t be attached to “any must-pass piece of legislation in 2017,” Cotton said.

Cotton and Perdue are pushing legislation to limit legal immigration and end policies permitting “chain migration.” But Cornyn and Graham are among those opposed to their bill. Cotton said Thursday that GOP leaders might opt instead to take up a narrower bill to address the legal status of dreamers, eliminate chain migration and bolster border security.

“If you keep trying to add more and more to the bill, it will collapse under its own weight,” he said.

But Cotton didn’t specify what border security measures might be included in the legislation.

“I personally think we need a wall. Walls work. Fences work. That’s why we have one around the White House, that’s why people have them around their back yard,” Cotton said.

But the White House fence has been breached several times in recent years, compelling the U.S. Park Service to make plans to install a higher, more fortified barrier.

Republican leadership aides confirmed the contents of Thursday’s White House meeting.

Top Democrats dismissed Trump’s requests, saying that they will maintain leverage over the spending talks and are building strong support for the Dream Act.

“We’re going to do everything we can to pass the bill, but we expect it will pass because we have a lot Republican support for this bill, and I think it is going to better than people think. No matter what Donald Trump says on one given day or another,” Senate Minority Leader Charles E. Schumer (D-N.Y.) told reporters.

House Minority Leader Nancy Pelosi (D-Calif.) added that “Republicans can talk to themselves in the mirror all they want, but the fact is the vote is the currency of the realm and Republicans frequently find themselves holding an empty wallet.”