President Trump last met with top congressional leaders in the Oval Office on Sept. 6. (Bill O'Leary/The Washington Post)

President Trump’s rocky relationship with Capitol Hill faces a crucial test Tuesday in a meeting with top Republican and Democratic congressional leaders that could edge the government closer to a year-end bipartisan fiscal deal — or a federal shutdown.

Leaders in both parties spent Monday preparing to make their case to an unpredictable president who abruptly sided with Democrats the last time he sat down with top leaders.

Ahead of the meeting with House Speaker Paul D. Ryan (R-Wis.), Senate Majority Leader Mitch McConnell (R-Ky.), House Minority Leader Nancy Pelosi (D-Calif.) and Senate Minority Leader Charles E. Schumer (D-N.Y.), there were unresolved questions about how much more money the federal government may spend in the coming years — plus pressing concerns regarding immigration and health care.

With government funding scheduled to dry up on Dec. 8, both sides have floated the possibility of passing a short-term plan that would push negotiations until just before Christmas. Currently, Congress may spend no more than $549 billion for defense programs and $516 billion for non-defense programs next year, a cut from current levels.

But the Trump administration and defense hawks want to boost defense spending to more than $600 billion, and Democrats are demanding a dollar-for-dollar increase in non-defense spending. In a sign of how serious Republicans are about boosting Pentagon spending, Defense Secretary Jim Mattis is expected to attend the meeting, according to aides.

White House legislative affairs director Marc Short said that the West Wing is “anxious to find a path forward on budget caps” that would pave the way for a long-term government spending bill. He said the president “will listen to both sides” in the meeting but will stick to such priorities as the need to rebuild the military.

In an interview Monday, Short declined to get ahead of Trump on the issue of “dreamers,” or young undocumented immigrants brought to the United States by their parents. But Short did not sound open to meeting the demands some Democrats are pushing to offer permanent protections to that population.

“Leader Schumer has had many comments in the past about why we should not attach policy riders to spending bills,” Short said.

Schumer warned Republicans last year that adding unrelated policy issues to spending legislation — “poison pill riders” in congressional parlance — would lead to Democratic opposition and that Republicans would “be obstructing if they allow poison pill riders to poison the process.”

But a year later — with Republicans in total control of Washington — Schumer and Democrats are insisting on adding such policy issues to the spending bill to win their support. Given that House Republicans have needed Democrats to help pass spending bills in recent years amid opposition from fiscal conservatives and because Senate Democrats can filibuster spending legislation, Schumer and Pelosi believe they have leverage to force a deal.

Previewing the meeting on Monday, Schumer cited spending levels, immigration policy and the need to renew programs such as the Children’s Health Insurance Program as top priorities in the closing days of the year.

“Hopefully we can make progress on an agreement that covers those time-sensitive issues that keeps the government running and working,” he said in Senate floor remarks.

Senate Minority Leader Charles E. Schumer D-N.Y.) and House Minority Leader Nancy Pelosi D-Calif.) address reporters on Nov. 13. (Alex Wong/Getty Images)

A senior Democratic aide familiar with planning for the meeting said that Democrats will maintain influence over negotiations in the coming weeks. “This meeting wouldn’t be happening if they had the votes on their own,” said the aide, who was granted anonymity to speak frankly.

In the weeks leading up to Trump’s last meeting with the top four congressional leaders in September, his frustration with his own party’s top officials was boiling over.

Senate GOP leaders had just fumbled attempts to repeal and replace the Affordable Care Act, leaving a long-held GOP priority unfulfilled. The meeting yielded an agreement that set up a short-term spending agreement — allowing Democrats to crow about how they maintained their negotiating leverage and Republicans to use the ensuing months to work on a bigger priority, tax reform.

While many tensions remain raw in the GOP, Trump has sharpened his attacks on Democrats in recent weeks. In the closely watched Alabama Senate race, Trump has warned on social media that voters “can’t let Schumer/Pelosi win this race,” as he has tried to cut into support for Democratic candidate Doug Jones.

Among Democrats, there is growing resolve to withhold support for a spending plan that fails to address the fate of dreamers. Trump announced in September that he is ending the Deferred Action for Childhood Arrivals program that granted temporary legal status to roughly 600,000 young immigrants. He has given Congress until March to enact a permanent fix or risk mass deportations.

At least three Democratic senators, Cory Booker (N.J.), Kamala D. Harris (Calif.) and Elizabeth Warren (Mass.), and independent Sen. Bernie Sanders (Vt.) — all of whom are potential Democratic presidential candidates in 2020 — have said they would vote against the spending plan if it doesn’t include protections for dreamers. Other potential Democratic presidential contenders, including Sens. Kirsten Gillibrand (N.Y.) and Chris Murphy (Conn.), have suggested they might also withhold support.

In the House, members of the Congressional Hispanic Caucus — who account for 28 of the 194 House Democrats — are expected to decide by the end of this week whether they will vote no against spending bills without an agreement to protect dreamers, according to caucus members and their aides. If they do, aides expect most if not all members of the congressional Black and Asian and Pacific Islander caucuses to join in opposition. Dozens of other Democrats might also vote no — representing more than half of the caucus.

Before the Thanksgiving break, aides to top Hispanic Caucus members huddled with senior aides to Pelosi to once again press her to push the issue. Caucus members are also hoping to meet with Schumer on Tuesday before he heads to the White House to convey their concerns, aides said.

"At this point, we feel they get it," an aide to a senior Latino lawmaker said about Pelosi and Schumer.

But Republicans remain insistent that establishing the parameters of a government spending bill that extends beyond elections next November should be the top priority for Tuesday’s meeting.

“You don’t want to have a spending showdown shutdown crisis before the midterms next year. So I think it’s important for both sides, honestly, to reach that agreement,” said Rep. Tom Cole (R-Okla.), a close ally of House GOP leaders.

Cole said he expected the president to “trust his instincts” during the negotiation, and he warned Democrats against holding up a spending bill over pressure to reach an immigration deal.

If “you try to hold the entire government hostage to a single issue,” Cole said, there’s a risk of making the “same mistake Republicans made in 2013 over Obamacare. It’s very apt to backfire.”

Republican opposition to the Affordable Care Act in 2013 led to a government shutdown that the public widely blamed on the GOP.

Rep. Andy Biggs (R-Ariz.), an outspoken conservative lawmaker, said Monday that he supported Ryan's calls not to include a DACA solution in the spending plan.

"Congress should pass single-subject legislation, which maximizes the transparency of our votes to constituents. It would be a grave mistake to add DACA reform to the spending bill," Biggs said in a statement, adding that a separate immigration measure should include money to build a wall along the U.S.-Mexico border.

Asked what he hoped Tuesday meeting's would yield, Sen. John Thune (R-S.D.) told reporters, "I hope a year-end solution, a pathway to making sure you guys are home on Christmas Eve instead of hanging out here with us."