The Senate on Thursday passed a short-term resolution to fund the government through mid-March, averting a shutdown before Friday's deadline.

The final vote was 65-27. President Joe Biden signed the bill into law early Friday afternoon, ahead of the deadline for a government shutdown.

The House of Representatives voted 272-162 in favor of the stopgap resolution last week to fund the government through March 11, while lawmakers put the finishing touches on a larger package to fund the government for a full year.

The House and Senate appropriations chairs last week announced that they reached a bipartisan, bicameral agreement on a framework to fund the government through the rest of the year, but needed more time to put the finishing touches on that deal. 

Smooth passage of the bill was held up by a trio of Republican amendments: One from Sen. Mike Lee, R-Utah, about defunding the COVID-19 vaccine mandates for federal workers, government employees and health care workers, one from Mike Braun, R-Ind., about balancing budgets, and one from Sen. Ted Cruz, R-Texas, which would withhold federal funding from schools with vaccine mandates.

All of the amendments failed — the addition of those amendments would have sent the bill back to the House, which is not in session, and prolonged the process, leading to missing the funding deadline.

Sen. Marco Rubio, R-Fla., also attempted to introduce an amendment that would prevent federal funding from going toward the distribution of crack pipes and other drug paraphernalia — a story picked up by conservative commentators that has been widely debunked by fact-checkers and rebuked by the White House. That measure also failed.

Earlier Thursday, Senate Minority Leader Mitch McConnell, R-Ky., gave his assurances that the Senate would not miss the deadline and the continuing resolution would pass.

“It's a typical [continuing resolution] exercise,” he told CNN. “We'll have some amendments and then we'll pass the CR and the government won't shut down.”

Another complicating factor? Both sides were missing key lawmakers: Sen. Lindsey Graham, R-S.C., was traveling overseas. Sen. Mark Kelly, D-Ariz., traveled home to Arizona after his wife, former Rep. Gabby Giffords, was hospitalized with appendicitis. Sen. Dianne Feinstein, D-Calif., also missed votes this week because of a family emergency. 

And while Sen. Ben Ray Luján, D-N.M., is completing his recovery from a stroke in Washington, D.C., he was still away from the Senate, hoping to return “in a few short weeks” to vote on President Biden’s eventual Supreme Court nominee.

Despite the shortcomings and short-handed Senate, the bill passed.

Among other things, the bill will provide $350 million to address an ongoing water contamination crisis near Joint Base Pearl Harbor-Hickam in Hawaii. The measure will also help pay for the growing costs associated with a fuel leak that tainted the water supply of roughly 90,000 people stationed or living near Joint Base Pearl Harbor-Hickam, including military families.