File photo.

KEVIN FREKING and LISA MASCARO / Associated Press

President Joe Biden on Friday signed into law the stopgap spending bill that will keep the federal government running through Feb. 18, after congressional leaders defused a partisan standoff over federal vaccine mandates.

The White House released a statement noting the bill signing and thanking congressional leaders for their work. Earlier in the day, Biden said it was worth praising bipartisanship, but “funding the government isn’t a great achievement, it’s the bare minimum of what needs to get done.”

Both chambers of Congress passed the legislation Thursday avoiding a short-term shutdown of the government into the weekend. The bill keeps the federal government running for 11 more weeks, generally at current spending levels, while adding $7 billion to aid Afghanistan evacuees.

“I am glad that in the end, cooler heads prevailed. The government will stay open and I thank the members of this chamber for walking us back from the brink of an avoidable, needless and costly shutdown,” said Senate Majority Leader Chuck Schumer, D-N.Y.

The Senate approved the measure by a vote of 69-28. Nineteen Republican senators joined with Democrats in voting for the measure.

The Democratic-led House passed the measure by a 221-212 vote. The Republican leadership urged members to vote no; the lone GOP vote for the bill came from Illinois Rep. Adam Kinzinger.

Lawmakers bemoaned the short-term fix and blamed the opposing party for the lack of progress on this year’s spending bills. Rep. Rosa DeLauro, chair of the House Appropriations Committee, said the measure would, however, allow for negotiations on a package covering the full budget year through September.

Before the votes, Biden said he had spoken with Senate leaders and he played down fears of a shutdown: “There is a plan in place unless somebody decides to be totally erratic, and I don’t think that will happen.”

Some Republicans opposed to Biden’s vaccine rules wanted Congress to take a hard stand against the mandated shots for workers at larger businesses, even if that meant shutting down federal offices over the weekend by refusing to expedite a final vote on the spending bill.

It was just the latest instance of the brinkmanship around government funding that has triggered several costly shutdowns and partial closures over the past two decades. The longest shutdown in history happened under President Donald Trump — 35 days stretching into January 2019, when Democrats refused to approve money for his U.S-Mexico border wall. Both parties agree the stoppages are irresponsible, yet few deadlines pass without a late scramble to avoid them.

Sen. Mike Lee, R-Utah, said Democrats knew last month that several Republicans would use all means at their disposal to oppose legislation that funds or allows the enforcement of the employer vaccine mandate. He blamed Schumer for not negotiating and for ignoring their position.

Lee and Sen. Roger Marshall, R-Kan., authored an amendment that prohibited federal dollars from being spent to implement and enforce a series of vaccine mandates put in place by the Biden administration. The amendment went down to defeat with 48 yes votes and 50 no votes.

Lee said millions were being forced to choose between an unwanted medical procedure and losing their job.

“Their jobs are being threatened by their own government,” Lee said.

Sen. Patty Murray, D-Wash., countered that the federal government should be using every tool to keep Americans safe and that is why the Biden administration has taken steps to urge employers to make sure their workers are fully vaccinated or test negative before they come to the workplace.

“No one wants to go to work and be worried they might come home to their family with a deadly virus,” Murray said.

The White House sees the vaccinations as the quickest way to end a pandemic that has killed more than 780,000 people in the United States and is still evolving, as seen Wednesday with the country’s first detected case of a troubling new variant.

Courts have knocked back against the mandates, including a ruling this week blocking enforcement of a requirement for some health care workers.

The administration has pursued vaccine requirements for several groups of workers, but the effort is facing legal setbacks.

A federal judge this week blocked the administration from enforcing a vaccine mandate on thousands of health care workers in 10 states. Earlier, a federal appeals court temporarily halted the OSHA requirement affecting employers with 100 or more workers.

The administration has also put in place policies requiring millions of federal employees and federal contractors, including military troops, to be fully vaccinated. Those efforts are also under challenge.

Polling from The Associated Press shows Americans are divided over Biden’s effort to vaccinate workers, with Democrats overwhelmingly for it while most Republicans are against.

Some Republicans prefer an effort from Sen. Mike Braun, R-Ind., to vote to reject the administration’s mandates in a congressional review action expected next week, separate from the funding fight.

Separately, some health care providers protested the stopgap spending measure. Hospitals say it does nothing to shield them from Medicare payment cuts scheduled to go into effect amid uncertainty about the new omicron variant.

Associated Press staff writer Ricardo Alonso-Zaldivar contributed to this report.