The Senate passed a short-term spending bill Thursday night, averting a government shutdown that was scheduled for Saturday unless Congress acted.

Senators voted 65-27 to approve the funding bill that will keep the government running until March 11. Lawmakers in both chambers are attempting to reach an agreement on a broader spending package for the fiscal year that ends Sept. 30.

Last week, the House passed the short-term bill, known as a continuing resolution, by a vote of 272-162. The bill is now on its way to President Joe Biden’s desk for his signature.

This week, Senate leaders from both parties stated repeatedly that there was no real risk of a shutdown. However, a quartet of Republican senators had slowed the bill’s passage by demanding votes on key conservative priorities.

That infuriated senior Democrats, who warned that the partisanship sent the wrong message to the world — and to Russian President Vladimir Putin — at a critical time when top US officials are warning the Kremlin not to invade Ukraine.

“Everyone has the right to express themselves.” Everyone has the right to make any political point they want for any group they want. But let’s talk about being senators in the United States! Ukraine is about to go to war!” Senate Appropriations Committee Chairman Patrick Leahy, D-Vt., railed on the Senate floor Thursday. “What we’re saying is that we’ll start putting all of these things in to slow down a continuing resolution so that the US government can shut down tomorrow night.”

The four Republican issues that slowed the funding bill’s passage were all of a domestic nature.

Senator Marco Rubio, R-Fla., requested a vote on a bill backed by Sen. Joe Manchin, D-W.Va., that would prohibit the Department of Health and Human Services from funding the distribution of crack pipes. According to Biden administration officials, a $30 million HHS program aimed at combating the substance use and overdose epidemic does not cover the cost of crack pipes.

Rubio took the floor on Thursday to try to pass crack-pipe legislation by voice vote, but Democrats objected. Democrats also defeated three conservative Republican amendments. The first, proposed by Sen. Mike Braun, R-Ind., would have mandated that the government balance its budget every year.

Two additional amendments centered on Covid-19 mandates. Sen. Mike Lee, R-Utah, demanded a vote to eliminate funding for the enforcement of all remaining federal vaccine mandates, while Sen. Ted Cruz, R-Texas, secured a vote on an amendment to prohibit funding for schools and child care centers that require children to receive Covid-19 vaccines.

“President Biden’s vaccine mandates are unconstitutional.” They have been largely overturned by the Supreme Court. And they are abusive,” Cruz, a former Texas solicitor general who led the 2013 government shutdown in an unsuccessful attempt to defund Obamacare, said.

The delay was caused in part by Senate absences. Sen. Ben Ray Lujan, D-New Mexico, is recovering from a stroke, though he tweeted Thursday that he is now in Washington. Sen. Mark Kelly, D-Ariz., had to return home to be with his wife, former Rep. Gabby Giffords, who is being treated for appendicitis in the hospital. Senator Dianne Feinstein, D-Calif., was also dealing with a family matter.

Due to the absence of those lawmakers, Democrats were concerned that some of the GOP amendments would pass in the 50-50 Senate, where the party has no wiggle room. As a result, Democratic leaders stalled and waited until a few Republican senators left town on Thursday evening, ensuring Democrats had just enough votes to defeat the GOP proposals. The Lee amendment was defeated by a single vote, 46-47, while the Cruz amendment was defeated by a vote of 44-49.

Republicans cast all 27 votes in opposition to the overall spending bill.

Immediately following Thursday’s votes, a dozen senators rushed to catch a flight to the Munich Security Conference, which begins Friday and will most likely focus on Russia’s escalating aggression toward Ukraine.