CNN  — 

President Joe Biden signed a stopgap bill on Friday to avert a government shutdown just hours ahead of a midnight deadline, the White House announced.

Congress acted to prevent a shutdown Thursday evening when both chambers voted to pass a stopgap bill to extend funding through mid-February after party leaders brokered a deal to overcome GOP brinkmanship over vaccine mandates. The final tally in the Senate was 69-28.

Passage of the stopgap bill ahead of a Friday at midnight deadline ended a standoff that had threatened to trigger a shutdown when a small number of Republican senators who object to Biden’s vaccine requirements had held out the possibility of holding up a quick vote on the funding bill.

To resolve the impasse, the two parties agreed to hold votes on the stopgap bill as well as a GOP amendment to prohibit the use of federal funding for Covid-19 vaccine mandates, which ultimately failed.

Earlier on Thursday, the House passed a continuing resolution to fund the government through February 18.

The final vote was 221-212. Rep. Adam Kinzinger of Illinois was the only Republican to join Democrats in voting for the resolution.

Negotiators from both parties had announced a plan Thursday morning that would prevent a lapse in funding. But due to Senate rules governing procedure, all 100 senators needed to agree to quickly pass the plan before Friday, an outcome that it was not clear could be locked in until late in the day, when party leaders announced a deal had been reached.

Some GOP objections over vaccine mandate

A group of Senate Republicans had threatened throughout the week to delay passage of the continuing budget resolution over the Biden administration’s rule that requires businesses with 100 or more employees to ensure their employees are fully vaccinated against Covid-19 or undergo regular testing and wear face masks in the workplace.

But when it came up for a vote, the Senate failed to approve a GOP amendment that would prohibit the use of federal funds to implement or enforce vaccine mandates for Covid-19, including for large businesses, federal health care workers and the military. The vote tally was 50-48.

Republican Sen. Mike Lee of Utah spoke on the Senate floor prior to the amendment vote related to vaccine requirements.

“We’re gonna be able to vote on whether or not we fund vaccine mandate enforcement at the federal level,” Lee said in his floor remarks ahead of the vote.

Other Republican senators fuming over potential shutdown

Senate Minority Leader Mitch McConnell had projected confidence throughout the week that there would not be a shutdown.

And many Republican senators told CNN before an agreement paving the way for a vote was reached that they were frustrated that a handful of their members might cause a brief shutdown – a fight they see as unwinnable in Congress.

“We have suggested to them very strongly that that this is not the right direction,” said Sen. Mike Rounds, a South Dakota Republican. “But they have the right.”

Rounds also criticized Senate leadership in both parties for allowing the funding fight to go until the last minute, giving leverage to any one senator to derail action.

“As long as the leadership allows themselves and the rest of us to be wedged, individual senators are going to be able to do that,” Rounds said. “We need to be getting our work done on time. It does not show us as being stable. And it’s a terrible example – not just for the citizens in this country – but to the rest of the world as well.”

Deal announced earlier Thursday

Earlier Thursday, House Appropriations Committee Chairwoman Rosa DeLauro, a Connecticut Democrat, announced the funding plan, which would go through February 18.

Separate from the vaccine issue, Democrats had wanted to extend funding only into January, a concession DeLauro acknowledged in her statement.

“To build pressure for an omnibus, the CR includes virtually no changes to existing funding or policy (anomalies),” DeLauro said in the announcement. “However, Democrats prevailed in including $7 billion for Afghanistan evacuees. The end date is February 18. While I wish it were earlier, this agreement allows the appropriations process to move forward toward a final funding agreement which addresses the needs of the American people.”

The Biden administration issued a statement Thursday morning that said it “strongly urges swift passage” of the continuing resolution to fund the government through February 18.

This story and headline have been updated with additional developments Friday.

CNN’s Annie Grayer, Lauren Fox, Betsy Klein, Daniella Diaz and Sonnet Swire contributed to this report.