The Senate on Thursday easily cleared a two-week stopgap funding bill, one day before the deadline to avoid a government shutdown.

Senators voted 81-14 on the legislation, which cleared the House earlier in the day.

The bill now heads to the White House, where President TrumpDonald John TrumpDeath toll in Northern California wildfire rises to 48: authorities Graham backs bill to protect Mueller Denham loses GOP seat in California MORE is expected to sign it.

Six Republicans, seven Democrats and Sen. Bernie SandersBernard (Bernie) SandersProgressive House Dem pushes for vote on 'Medicare for all' bill Castro takes steps toward likely 2020 bid Election Countdown: Lawsuits fly in Florida recount fight | Nelson pushes to extend deadline | Judge says Georgia county violated Civil Rights Act | Biden, Sanders lead 2020 Dem field in poll | Bloomberg to decide on 2020 by February MORE (I-Vt.) voted against the legislation. 

Congress had until the end of Friday to pass a bill or spark a government shutdown — something GOP leadership has been adamant they would not let happen while they control the levers of power in Washington.

Lawmakers now face another deadline on Dec. 22, setting up a funding showdown just three days before Christmas.

Top GOP senators urged their colleagues to support the legislation despite grumbling among some in the caucus about the impact a continuing resolution has on military spending.

“We need this legislation to give Congress and the administration additional time to agree on responsible spending levels for the current fiscal year and beyond. ... I hope the Dec. 22 backstop will facilitate an agreement that will enable the Congress to provide funding for important national security and domestic priorities,” Sen. Thad CochranWilliam (Thad) Thad CochranElection Countdown: Lawsuits fly in Florida recount fight | Nelson pushes to extend deadline | Judge says Georgia county violated Civil Rights Act | Biden, Sanders lead 2020 Dem field in poll | Bloomberg to decide on 2020 by February Election Countdown: Florida braces for volatile recount | Counties race to finish machine recount | Trump ramps up attacks | Abrams files new lawsuit in Georgia | 2020 to be new headache for Schumer | Why California counts its ballots so slowly Election Countdown: Arizona Senate race still too close to call | Florida vote tally fight heats up | Trump calls for Abrams to 'move on' MORE (R-Miss.), chairman of the Appropriations Committee, said shortly before the Thursday evening vote.

Majority Leader Mitch McConnellAddison (Mitch) Mitchell McConnellGraham backs bill to protect Mueller Grassley defends acting AG against calls for recusal Former staffers push Congress for action on sexual harassment measure MORE (R-Ky.) said the stopgap measure would “provide us with the time we need to complete discussions on a long-term solution.”

But Sen. John McCainJohn Sidney McCainVan Hollen not interested in staying on as chair of Senate Dems' campaign arm Election Countdown: Lawsuits fly in Florida recount fight | Nelson pushes to extend deadline | Judge says Georgia county violated Civil Rights Act | Biden, Sanders lead 2020 Dem field in poll | Bloomberg to decide on 2020 by February Jeff Flake congratulates Kyrsten Sinema on win: ‘You’ll be great’ MORE (R-Ariz.), the chairman of the Armed Services Committee, said it was "unacceptable" that Congress was passing the stopgap bill.

"I have implored Congress and the White House to negotiate a bipartisan budget agreement, because without one, the military will be funded under a Continuing Resolution at the Budget Control Act levels," he said.

Senate Republicans can’t pass a government funding bill on their own, and needed consent from Democrats to speed up debate of the legislation to meet Friday’s deadline.

Democratic leadership remained tight-lipped throughout the week about if they would support a continuing resolution as they looked for leverage in negotiations on a final, year-end spending package. 

“I don’t know. I think this is likely to pass,” Sen. Dick DurbinRichard (Dick) Joseph DurbinSenate GOP readies for leadership reshuffle Durbin: Republicans are making it 'as hard as possible' to vote GOP Rep. Rodney Davis wins reelection in Illinois MORE (D-Ill.) told reporters in the lead up to Thursday’s vote.

Negotiators are hoping to get a deal on the budget caps before the Dec. 22 deadline. 
 
An agreement would likely allow lawmakers to pass another continuing resolution into January and use the time to craft a "omnibus" spending bill that would fund the government through the rest of the 2018 fiscal year. 
 
If lawmakers aren't able to get a deal on the budget, sequestration is set to start in mid-January, which will spark automatic spending cuts. 
 
McConnell, Minority Leader Charles SchumerCharles (Chuck) Ellis SchumerSunday shows preview: Trump taps acting attorney general to lead Justice Department Pro-Israel organizations should finally seek payback against Iran deal Dems Pelosi: Acting attorney general 'should not be there' MORE (D-N.Y.), Speaker Paul RyanPaul Davis RyanEarmarks look to be making a comeback Former staffers push Congress for action on sexual harassment measure House Republicans need history lesson in battle over next leader MORE (R-Wis.) and House Minority Leader Nancy PelosiNancy Patricia D'Alesandro PelosiGraham backs bill to protect Mueller Clyburn says some critics are using race to oppose his leadership bid Congress can unite on global affairs MORE (D-Calif.) met with Trump and Vice President Pence at the White House on Thursday to discuss the looming year-end fight. 
 
McConnell told reporters after the meeting that they did not reach an agreement, with Schumer and Pelosi offering a similar take in a joint statement. 
 
“We had a productive conversation on a wide variety of issues. Nothing specific has been agreed to, but discussions continue," they said. 
 
Democrats want an equal increase in defense and nondefense spending, as well as an extension of the Children's Health Insurance Program (CHIP) and a legislative fix for the Deferred Action for Childhood Arrivals (DACA) program. 
 
The Trump administration announced earlier this year that it was nixing DACA, which allows immigrants brought into the country as children to live and work. The program will expire in March. 
Trump's move has sparked a legislative showdown in the Senate.
 
Democrats, who say the issue needs to be dealt with by the end of the year, want Republicans to pass a deal that links the Development, Relief, and Education for Alien Minors (DREAM) Act with border security. 
 
Republicans, and the White House, counter that an immigration deal will not be included in the funding bill. 

Sen. James LankfordJames Paul LankfordThe Hill's Morning Report — Split decision: Dems take House, GOP retains Senate majority Midterm vote to set cyber agenda The Hill's Morning Report — Presented by PhRMA — Trump divides Republicans ahead of midterms MORE (R-Okla.), who introduced legislation that would include a path to citizenship, said on Thursday that lawmakers didn't have time to reach an agreement by the end of the year. 

"There's too many outstanding issues. ... There's not enough time to build the coalitions to get a result by the end of the year," he said. 

In addition to Sanders and McCain, the senators who voted against the stopgap funding bill were Cory BookerCory Anthony BookerPavlich: Where is Brett Kavanaugh’s apology? Poll: Biden and Sanders lead 2020 Dem field, followed by Beto O'Rourke Dems find easy target in Trump commerce chief MORE (D-N.J.), Ted CruzRafael (Ted) Edward CruzIncoming Dem lawmaker from Texas says Nielsen should be replaced as DHS chief Election Countdown: Lawsuits fly in Florida recount fight | Nelson pushes to extend deadline | Judge says Georgia county violated Civil Rights Act | Biden, Sanders lead 2020 Dem field in poll | Bloomberg to decide on 2020 by February Poll: Biden and Sanders lead 2020 Dem field, followed by Beto O'Rourke MORE (R-Texas), Joni ErnstJoni Kay ErnstThis week: Congress starts lame-duck with leadership fight Senate GOP readies for leadership reshuffle Record number of female veterans to serve in next Congress MORE (R-Iowa), Kirsten GillibrandKirsten Elizabeth GillibrandSchumer’s headaches to multiply in next Congress Election Countdown: Arizona Senate race still too close to call | Florida vote tally fight heats up | Trump calls for Abrams to 'move on' Pro-Israel organizations should finally seek payback against Iran deal Dems MORE (D-N.Y.), Kamala HarrisKamala Devi HarrisCastro takes steps toward likely 2020 bid Pavlich: Where is Brett Kavanaugh’s apology? Kamala Harris celebrates electoral victory of 19 black women in Texas: ‘#BlackGirlMagic’ MORE (D-Calif.), Mazie HironoMazie Keiko HironoVictimhood culture and traditional justice are on a collision course Hirono coasts to reelection in Hawaii Senate race It’s time to recognize the service of Chinese-American WWII veterans with Congressional Gold Medal MORE (D-Hawaii), Mike LeeMichael (Mike) Shumway LeeCongress must make sentencing reform priority for public safety MyPillow CEO to attend White House opioid discussion Congress raises pressure on Saudi Arabia MORE (R-Utah), Ed MarkeyEdward (Ed) John MarkeyHouse Dems can take on climate change — if they don’t get distracted by Trump Dems find easy target in Trump commerce chief Trump mulls replacing Commerce chief Ross by end of year: reports MORE (D-Mass.), John McCain (R-Ariz.), Jeff MerkleyJeffrey (Jeff) Alan MerkleyICE has record number of people in custody: report Schumer’s headaches to multiply in next Congress White House-Acosta feud is talk of town MORE (D-Ore.), Mike RoundsMarion (Mike) Michael RoundsOn The Money: Deficit hits six-year high of 9 billion | Yellen says Trump attacks threaten Fed | Affordable housing set for spotlight in 2020 race Lawmakers, Wall Street shrug off Trump's escalating Fed attacks GOP shrugs off dire study warning of global warming MORE (R-S.D.), Ben SasseBenjamin (Ben) Eric SasseMajority say Trump should face primary challenge, poll finds Election Countdown: Arizona Senate race still too close to call | Florida vote tally fight heats up | Trump calls for Abrams to 'move on' Flake not ruling out 2020 run against Trump MORE (R-Neb.) and Elizabeth WarrenElizabeth Ann WarrenCastro takes steps toward likely 2020 bid What midterm exit polls tell us about 2020 Deval Patrick: Obama was too eager to compromise with GOP MORE (D-Mass.).

- This story was updated at 6:31 p.m.