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 TrumpNASA exec leading moon mission quits weeks after appointment The Hill's Morning Report — After contentious week, Trump heads for Japan Frustration boils over with Senate's 'legislative graveyard' MORE is expected to sign it.

Six Republicans, seven Democrats and Sen. Bernie SandersBernie Sanders2020 Democrats join striking McDonald's workers Billionaire's M gift to Morehouse grads points way to student debt solution Poll: Nearly half of Clinton's former supporters back Biden 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 CochranTop 5 races to watch in 2019 Bottom Line Races Dems narrowly lost show party needs to return to Howard Dean’s 50 state strategy MORE (R-Miss.), chairman of the Appropriations Committee, said shortly before the Thursday evening vote.

Majority Leader Mitch McConnellAddison (Mitch) Mitchell McConnellThe Hill's Morning Report — After contentious week, Trump heads for Japan Frustration boils over with Senate's 'legislative graveyard' New Yorker cover titled 'The Shining' shows Graham, McConnell, Barr polishing Trump's shoes 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 McCainMeghan McCain on Pelosi-Trump feud: 'Put this crap aside' and 'work together for America' Meghan McCain says Ben Carson should be developing brain cancer treatment, not working at HUD Graham urges Trump not to abandon infrastructure talks with Democrats 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 DurbinThreat of impeachment takes oxygen out of 2019 agenda Senate Democrats request watchdog, Red Cross probe DHS detention facilities Iraq War looms over Trump battle with Iran 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 SchumerNo agreement on budget caps in sight ahead of Memorial Day recess Ex-White House photographer roasts Trump: 'This is what a cover up looked like' under Obama Pelosi: Trump 'is engaged in a cover-up' MORE (D-N.Y.), Speaker Paul RyanPaul Davis RyanAmash storm hits Capitol Hill Debate with Donald Trump? Just say no Ex-Trump adviser says GOP needs a better health-care message for 2020 MORE (R-Wis.) and House Minority Leader Nancy PelosiNancy PelosiThe Hill's Morning Report — After contentious week, Trump heads for Japan Frustration boils over with Senate's 'legislative graveyard' Trump-Pelosi fight threatens drug pricing talks 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 LankfordSenate passes disaster aid bill after deal with Trump Congress reaches deal on disaster aid Bipartisan group of senators introduce legislation designed to strengthen cybersecurity of voting systems 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 Booker2020 hopeful John Delaney unveils T climate plan Harris readies a Phase 2 as she seeks to rejuvenate campaign T.I., Charlamagne Tha God advocate for opportunity zones on Capitol Hill MORE (D-N.J.), Ted CruzRafael (Ted) Edward CruzThe Hill's Morning Report — After contentious week, Trump heads for Japan Senate GOP votes to permanently ban earmarks Jim Carrey fires back at 'Joe McCarthy wanna-be' Cruz MORE (R-Texas), Joni ErnstJoni Kay ErnstSenate defense bill would make military sexual harassment standalone crime Congress, White House near deal on spending, debt limit Trump mulling visit to ethanol refinery later this month: report MORE (R-Iowa), Kirsten GillibrandKirsten Elizabeth Gillibrand2020 Democrats join striking McDonald's workers Fox News contributor Campos-Duffy compares abortion to slavery 2020 Dems put spotlight on disabilities issues MORE (D-N.Y.), Kamala HarrisKamala Devi HarrisCastro swears off donations from oil, gas, coal executives Harris leads California Democrats in condemning HUD immigrant housing policy Billionaire's M gift to Morehouse grads points way to student debt solution MORE (D-Calif.), Mazie HironoMazie Keiko HironoSenate confirms Rosen for No. 2 spot at DOJ Alabama abortion law sparks fears Supreme Court may overturn Roe v. Wade The CASE Act is an opportunity for creators to have rights and remedies MORE (D-Hawaii), Mike LeeMichael (Mike) Shumway LeeOn The Money: Senate passes disaster aid bill after deal with Trump | Trump to offer B aid package for farmers | House votes to boost retirement savings | Study says new tariffs to double costs for consumers Senate passes disaster aid bill after deal with Trump Hillicon Valley: Google delays cutting off Huawei | GOP senators split over breaking up big tech | Report finds DNC lagging behind RNC on cybersecurity MORE (R-Utah), Ed MarkeyEdward (Ed) John MarkeyHillicon Valley: Assange hit with 17 more charges | Facebook removes record 2.2B fake profiles | Senate passes anti-robocall bill | Senators offer bill to help companies remove Huawei equipment Senate passes anti-robocall bill The Hill's 12:30 Report: Pelosi fires back in feud with Trump MORE (D-Mass.), John McCain (R-Ariz.), Jeff MerkleyJeffrey (Jeff) Alan MerkleyHillicon Valley: Assange hit with 17 more charges | Facebook removes record 2.2B fake profiles | Senate passes anti-robocall bill | Senators offer bill to help companies remove Huawei equipment The Hill's 12:30 Report: Pelosi fires back in feud with Trump Senators introduce bill to end warrantless searches of electronic devices at border MORE (D-Ore.), Mike RoundsMarion (Mike) Michael RoundsKlobuchar: Trump plan doesn't deal with 'comprehensive immigration issue' GOP gets used to saying 'no' to Trump On The Money: Wells Fargo CEO steps down | Trump vows to keep funding for Special Olympics | House panel approves marijuana banking bill | Controversial Fed pick gains support in Senate MORE (R-S.D.), Ben SasseBenjamin (Ben) Eric SasseSenate GOP votes to permanently ban earmarks The Hill's Morning Report - White House, Congress: Urgency of now around budget Senate Republicans running away from Alabama abortion law MORE (R-Neb.) and Elizabeth WarrenElizabeth Ann WarrenThe Hill's Morning Report — After contentious week, Trump heads for Japan On The Money: Senate passes disaster aid bill after deal with Trump | Trump to offer B aid package for farmers | House votes to boost retirement savings | Study says new tariffs to double costs for consumers Overnight Energy: Democrats ask if EPA chief misled on vehicle emissions | Dem senators want NBC debate focused on climate change | 2020 hopeful John Delaney unveils T climate plan MORE (D-Mass.).

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