The Senate passed a short-term two-week spending bill that averted a government shutdown on Dec. 7. (C-SPAN)

Congress passed a short-term spending deal Thursday, sending to President Trump a bill to avert a partial government shutdown and setting up a heated budget fight later this month.

Trump has indicated that he will sign the deal, preventing a government stoppage that had been set to take effect at 12:01 a.m. Saturday.

The deal does not resolve numerous debates over domestic spending, immigration and funding for the military that brought the government to the brink of partial closure, leaving party leaders with a new Dec. 22 deadline to keep the government open.

There are clear obstacles to any longer-term deal, and leaders of both parties are demanding concessions in exchange for their members’ support. Democrats are pushing for the next government funding bill to include increased domestic spending, legal status for undocumented immigrants brought to the United States as children and other party priorities. Some Republicans are pushing for increased defense spending, while others have made shrinking the government their top objective.

Republicans have majorities in both chambers of Congress, but they cannot pass spending bills alone. In the Senate, a 60-vote supermajority is required to pass most major legislation, and Republicans control 52 seats. That means negotiating with Democrats, who have pushed to maintain their own domestic spending priorities, as well as policy initiatives on immigration, health care and more.

House Speaker Paul D. Ryan (R-Wis.) (Susan Walsh/AP)

Trump himself cast doubt Wednesday about the prospects for a deal, telling reporters that Democrats “want to have illegal immigrants pouring into our country, bringing with them crime, tremendous amounts of crime.” A shutdown over the issue, he said, “could happen.”

The chairman of the House Freedom Caucus, a group of hard-line conservatives who have bucked GOP leaders on past government spending bills, warned that any bipartisan deal on spending risked a Republican revolt later this month.

“It takes two bodies to put something into law, and the president’s agreement to a caps deal does not mean that it is fiscally the best thing for the country,” Rep. Mark Meadows (R-N.C.) said. “I want to avoid a headline that says President Trump’s administration just passed the highest spending levels in U.S. history.”

The short-term measure passed the Senate 81 to 14 and passed the House 235 to 193.

Congressional leaders of both parties went to the White House on Thursday afternoon to begin talks with Trump on a long-term spending pact.

“We’re all here today as a very friendly, well-unified group, well-knit-together group of people,” Trump said at the start of the Oval Office meeting. “We hope that we’re going to make some great progress for our country. I think that will happen, and we’ll appreciate it very much.”

The meeting broke up without any specific deal reached, but the parties said in separate statements that discussions would continue in the coming weeks.

The Republican leaders said immigration “should be a separate process and not used to hold hostage funding for our men and women in uniform,” while Democrats said they would “continue to press for action on the urgent, bipartisan priorities before Congress,” including domestic spending and immigration.

Speaking to reporters Thursday morning, House Minority Leader Nancy Pelosi (D-Calif.) laid out a host of Democratic demands, including funding for veterans, resources to fight the opioid crisis and the passage of a bill granting legal status to hundreds of thousands of “dreamers” — immigrants brought without documentation to the United States as children.

Pelosi sent mixed signals on how far Democrats would go to secure their priorities, saying on one hand that “Democrats are not willing to shut government down” but on the other that they “will not leave” Washington for the holidays without a fix for dreamers.

The main source of the Democrats’ leverage, however, is the Republicans’ desire to increase military spending to more than $600 billion in 2018.

Under a 10-year budget deal struck in 2011, Congress may appropriate a maximum of $549 billion for defense programs and $516 billion for nondefense programs next year. Republican leaders have floated a $54 billion boost in defense next year and a $37 billion increase in nondefense spending. Democrats have thus far demanded equivalent increases for both.

“We need a strong national defense, but we also need a strong domestic budget,” Pelosi said Thursday.

Among those joining the White House meeting Thursday were Vice President Pence, Defense Secretary Jim Mattis, White House budget director Mick Mulvaney and senior adviser Stephen Miller.

Mattis and Mulvaney are seen on Capitol Hill as pivotal figures in a clash within the Trump administration over whether to cut a deal with Democrats to raise domestic spending to secure an increase in the military budget. Mattis has pushed internally to work with Democrats to secure a bigger military budget, while Mulvaney has argued for pursuing a harder line. Miller, meanwhile, is considered the strongest advocate in the White House for tougher immigration policies and argued Thursday for new strictures as part of any dreamer deal, according to a congressional aide briefed on the meeting. 

The stopgap bill Congress passed Thursday does not change existing spending levels, and defense hawks have resisted calls to pass temporary bills into the new year, arguing that the military needs a boost.

But conservatives see it differently: They want to provoke a confrontation with Democrats and break a cycle of bipartisan deals that has led both military and nondefense discretionary spending to rise in lockstep. They are also wary of a year-end spending bill becoming a legislative “Christmas tree” that could include relief for dreamers and other Democratic priorities.

That, Meadows said, would be “not only problematic, but it will be met with such resistance that we haven’t seen on the Hill for many, many years.”

Meadows said he is pushing House Speaker Paul D. Ryan (R-Wis.) to “do short-term spending until we break the defense-nondefense connection.” He said GOP leaders have expressed openness to drafting a funding bill this month that funds the military through the remainder of the fiscal year while leaving the remainder of the federal bureaucracy subject to a weeks-long extension.

Ryan declined Thursday to confirm any such deal; Pelosi said it would be a nonstarter for Democrats. Were the House to pass such a bill, the Senate would be likely to send back a bipartisan measure that would include provisions that conservatives dislike. But that could win votes from House Democrats, sidelining the conservatives.

“We’re going to take the speaker at his word that he’s going to fight,” Meadows said, adding, “If all we do is pass a bill and watch the Senate change it, and then agree to higher spending, that is not a fight.”