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 TrumpGillibrand urges opposition to Kavanaugh: Fight for abortion rights 'is now or never' Trump claims tariffs on foreign nations will rescue US steel industry: report Bannon announces pro-Trump movie, operation team ahead of midterms: report MORE is expected to sign it.

Six Republicans, seven Democrats and Sen. Bernie SandersBernard (Bernie) SandersSanders to campaign for Florida Dem governor candidate Lewandowski says Bloomberg would be 'very competitive' against Trump in 2020 One Vermont Republican wins statewide nomination in six races 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 CochranMississippi courthouse named for Thad Cochran Todd Young in talks about chairing Senate GOP campaign arm US farming cannot afford to continue to fall behind MORE (R-Miss.), chairman of the Appropriations Committee, said shortly before the Thursday evening vote.

Majority Leader Mitch McConnellAddison (Mitch) Mitchell McConnellGOP senator reviving effort to rein in Trump on tariffs The Hill's 12:30 Report GOP’s midterm strategy takes shape 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 McCainComey: Trump revoking Brennan's security clearance shows 'he will punish people who disagree with him' Businesses fear blowback from Russia sanctions bill GOP’s midterm strategy takes shape 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 DurbinDems seize on Kavanaugh emails to question role in terrorism response Trump gives thumbs up to prison sentencing reform bill at pivotal meeting Overnight Defense: Officials make show of force on election security | Dems want probe into Air Force One tours | Pentagon believes Korean War remains 'consistent' with Americans 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 SchumerElection Countdown: GOP worries House majority endangered by top of ticket | Dems make history in Tuesday's primaries | Parties fight for Puerto Rican vote in Florida | GOP lawmakers plan 'Freedom Tour' Senate Democrats should stop playing politics on Kavanaugh Montana GOP Senate hopeful touts Trump's support in new ad MORE (D-N.Y.), Speaker Paul RyanPaul Davis RyanTrump revokes Brennan's security clearance The Hill's 12:30 Report Poll: Republicans favor Scalise for Speaker; Dems favor Pelosi MORE (R-Wis.) and House Minority Leader Nancy PelosiNancy Patricia D'Alesandro PelosiNY Post joins outlets publishing anti-Trump editorials Overnight Defense: Trump revokes Brennan's security clearance | Brennan fires back: 'I will not relent' | Defense firms bullish on 'Space Force' | Treasury targets Chinese, Russian firms for helping North Korea Election Countdown: GOP worries House majority endangered by top of ticket | Dems make history in Tuesday's primaries | Parties fight for Puerto Rican vote in Florida | GOP lawmakers plan 'Freedom Tour' 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 LankfordHillicon Valley: FBI fires Strzok after anti-Trump tweets | Trump signs defense bill with cyber war policy | Google under scrutiny over location data | Sinclair's troubles may just be beginning | Tech to ease health data access | Netflix CFO to step down House Intel lawmakers introduce bipartisan election security bill Trump officials look to neutralize cyber threats in supply chain 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 BookerDemocrats embracing socialism is dangerous for America Kavanaugh recommended against Clinton indictment in 1998: report Kavanaugh once said president would likely have to testify before grand jury if subpoenaed: report MORE (D-N.J.), Ted CruzRafael (Ted) Edward CruzElection Countdown: GOP worries House majority endangered by top of ticket | Dems make history in Tuesday's primaries | Parties fight for Puerto Rican vote in Florida | GOP lawmakers plan 'Freedom Tour' Former spokeswoman defends Trump calling Omarosa ‘dog’: He’s called men dogs Mellman: Two worlds — Online and off MORE (R-Texas), Joni ErnstJoni Kay ErnstSenators introduce bill to change process to levy national security tariffs Overnight Defense: Pompeo spars with senators at hearing | Trump, Putin meeting won't happen until next year | Pentagon was caught off guard by White House on Syria Andrew Wheeler must reverse damage to American heartland MORE (R-Iowa), Kirsten GillibrandKirsten Elizabeth GillibrandGillibrand urges opposition to Kavanaugh: Fight for abortion rights 'is now or never' Lewandowski says Bloomberg would be 'very competitive' against Trump in 2020 Democrats embracing socialism is dangerous for America MORE (D-N.Y.), Kamala HarrisKamala Devi HarrisOvernight Health Care: Arkansas Medicaid work rules could cost thousands coverage | Record number of overdose deaths in 2017 | Dems demand immediate reunification of separated children Senate Dems demand immediate reunification of remaining separated children Lewandowski says Bloomberg would be 'very competitive' against Trump in 2020 MORE (D-Calif.), Mazie HironoMazie Keiko HironoThe Hill's Morning Report — Trump heads to New York to shore-up GOP districts They knew it would cause lasting harm, and still took children from parents Dem strategist: It's 'far-left thinking' to call for Nielsen's resignation MORE (D-Hawaii), Mike LeeMichael (Mike) Shumway LeeEx-Virginia GOP Senate candidate shares offensive voicemail allegedly left by Charlottesville rally organizer Facebook cracks down on 3D guns Exclusive: Bannon blasts 'con artist' Kochs, 'lame duck' Ryan, 'diminished' Kelly MORE (R-Utah), Ed MarkeyEdward (Ed) John MarkeyMake the moon a refueling station — then head to Mars Dems push FEMA on housing help for displaced Puerto Ricans Overnight Energy: Trump moves to roll back Obama auto emissions standards | California vows to sue | Senate Dem looks to block plan in Congress MORE (D-Mass.), John McCain (R-Ariz.), Jeff MerkleyJeffrey (Jeff) Alan MerkleyBipartisanship alive and well, protecting critical infrastructure Overnight Defense: Senate sends 7B annual defense bill to Trump's desk | US sanctions Turkish officials over detained pastor | Korean War remains headed to Hawaii | Senators reassure allies on NATO support Dem strategist: It's 'far-left thinking' to call for Nielsen's resignation MORE (D-Ore.), Mike RoundsMarion (Mike) Michael RoundsTougher Russia sanctions face skepticism from Senate Republicans EPA’s Wheeler gets warmer welcome at Senate hearing Tenn. Republicans to go on offense against Dem MORE (R-S.D.), Ben SasseBenjamin (Ben) Eric SassePollster: Attitudes toward Trump's farm aid are 'highly wrapped up' in feelings toward president Poll: Majority of Americans support Trump's plan to offer aid to farmers hit by tariffs Hillicon Valley: 'QAnon' conspiracy theory jumps to primetime | Senate Intel broadens look into social media manipulation | Senate rejects push for more election security funds | Reddit reveals hack MORE (R-Neb.) and Elizabeth WarrenElizabeth Ann WarrenOn The Money: Turkey slaps more tariffs on US goods | Businesses fear blowback from Russia sanctions bill | Senate turns to toughest 'minibus' yet Warren introduces Accountable Capitalism Act Lewandowski says Bloomberg would be 'very competitive' against Trump in 2020 MORE (D-Mass.).

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