U.S. Congress passed another short-term spending measure Thursday that would keep one set of federal agencies operating through March 8 and another set through March 22, avoiding a shutdown for parts of the federal government that would otherwise kick in Saturday. The bill now goes to U.S. President Joe Biden to be signed into law.

The short-term extension is the fourth in recent months, and many lawmakers expect it to be the last for the current fiscal year. U.S. House Speaker Mike Johnson said negotiators had completed six of the annual spending bills that fund federal agencies and had 鈥渁lmost final agreement on the others.鈥

鈥淲e'll get the job done,鈥 Johnson said as he exited a closed-door meeting with Republican colleagues.

The House acted first Thursday. The vote to approve the extension was 320-99. It easily cleared the two-thirds majority needed for passage. Democrats overwhelmingly voted to avert a partial shutdown. But the vote was much more divided with Republicans, 113 in support and 97 against.

The Senate then took up the bill and approved it during an evening vote of 77-13.

鈥淲hen we pass this bill, we will have, thank God, avoided a shutdown with all its harmful effects on the American people,鈥 Senate Majority Leader Chuck Schumer said moments before the vote.

Next week, the House and Senate are expected to take up a package of six spending bills and get them to the president before March 8. Then, lawmakers would work to fund the rest of the government by the new March 22 deadline.

At the end of the process, Congress is expected to have approved more than US$1.6 trillion in spending for the fiscal year that began Oct. 1. That amount is roughly in line with the previous fiscal year and is what former Speaker Kevin McCarthy negotiated with the White House last year before eight disgruntled Republican lawmakers joined with Democrats a few months later and voted to oust him from the position.

Some of the House's most conservative members wanted deeper cuts for non-defense programs than that agreement allowed through its spending caps. They also sought an array of policy changes that Democrats opposed. They were hoping the prospect of a shutdown could leverage more concessions.

鈥淟ast I checked, the Republicans actually have a majority in the House of Representatives, but you wouldn鈥檛 know it if you looked at our checkbook because we are all too willing to continue the policy choices of Joe Biden and the spending levels of Nancy Pelosi,鈥 said Rep. Matt Gaetz, R-Fla.

But Rep. Chuck Fleischmann, R-Tenn., countered before the vote that shutdowns are damaging and encouraged lawmakers to vote for the short-term extension.

鈥淚 want the American people to know, Mr. Speaker, that this negotiation has been difficult, but to close the government down at a time like this would hurt people who should not be hurt,鈥 Fleischmann said.

The split within the GOP conference on spending and their tiny House majority bogged down the efforts to get the bills passed on a timely basis. With the Senate also struggling to complete work on all 12 appropriations bills, lawmakers have resorted to a series of short-term measures to keep the government funded.

Republican leadership said that the broader funding legislation being teed up for votes in March would lead to spending cuts for many nondefense agencies. By dividing the spending bill up into chunks, they are hoping to avoid an omnibus bill 鈥 a massive, all-encompassing bill that lawmakers generally had little time to digest or understand before voting on it. Republicans vowed there would be no omnibus this time.

鈥淲hen you take away Defense and Veterans Affairs, the rest of the agencies are going to be seeing spending cuts in many cases," said House Majority Leader Steve Scalise, R-La. 鈥淭here are also some policy changes that we pushed through the House that will be in the final product. Of course, some of those are still being negotiated.鈥

The temporary extension funds the departments of Agriculture, Transportation, Interior and others through March 8. It funds the Pentagon, Homeland Security, Health and Human Services and the State Department through March 22.

While congressional leaders have said they've reached final agreement on what will be in the first package of spending bills voted on next week, there's still room for an impasse on the second package to be voted on later in the month.

鈥淲e are working in a divided government. That means to get anything done, we have to work together, in good faith to reach reasonable outcomes," said Sen. Patty Murray, the Democratic chair of the Senate Appropriations Committee.

The renewed focus on this year's spending bills doesn't include the separate, US$95.3 billion aid package that the Senate approved for Ukraine, Israel and Taiwan earlier this month, with much of that money being spent in the U.S. to replenish America's military arsenal. The bill also contained about US$9 billion in humanitarian assistance for civilians in Gaza and the West Bank, Ukraine and other war zones.

Biden summoned congressional leaders to the White House on Tuesday, during which he and others urged Johnson to also move forward with the aid package. Senate Majority Leader Chuck Schumer said the U.S. can't afford to wait months to provide more military assistance to Ukraine, which is running short of the arms and ammunition necessary to repel Russia's military invasion.

鈥淲e鈥檝e got a lot of priorities before us, but we have to get the government funded and secure our border and then we鈥檒l address everything else," Johnson told reporters upon exiting his meeting with GOP colleagues.

Democrats urged quicker action on Ukraine as the temporary spending bill was debated.

鈥淲ithout swift action, the legacy of this Congress will be the destruction of Ukraine, the appeasement of a dictator, and the abandonment of starving children and ailing families,鈥 said Rep. Rosa DeLauro, the top Democrat on the House Appropriations Committee.