(CNN) — The House of Representatives voted Thursday to pass a stopgap bill to avert a partial government shutdown at the end of the week. The measure will next need to be taken up and passed by the Senate.

Congress is confronting a pair of shutdown deadlines – on March 1 and March 8. At the end of the day Friday, funding will expire for a series of key government agencies if lawmakers do not pass the stopgap before that time.

The House vote was 320 to 99 with 113 Republicans voting in favor and 97 Republicans voting against. Two Democrats voted against the measure.

Senate Majority Leader Chuck Schumer has said he hopes his chamber will be able to address the short-term funding extension Thursday evening.

“I hope the Senate can pass the short-term CR as soon as tonight but that will require all of us working together,” the Democrat from New York said. Short-term funding extensions are known on Capitol Hill as continuing resolutions or CR for short. “There’s certainly no reason this should take a very long time. So let’s cooperate and get it done quickly.”

On Wednesday, congressional leaders announced an agreement on six appropriations bills and said the package of full-year bills will be enacted before March 8, while the remaining appropriations bills to fund the rest of the government will be finalized and passed before March 22.

To provide time for the full-year bills to be finalized and passed, a stopgap bill will extend funding on a short-term basis and set up two deadlines on March 8 and March 22.

House Speaker Mike Johnson has been under intense pressure from his right flank to fight for conservative wins in the government funding battle, and hardliners were quick to push back on the prospect of another short-term funding bill.

“The appropriations process is ugly,” Johnson told reporters on Thursday. “Democracy is ugly. This is the way it works every year – always has – except that we’ve instituted some new innovations. We broke the omnibus fever, right? That’s how Washington has been run for years. We’re trying to turn the aircraft carrier back to real budgeting and spending reform. This was an important thing to break it up into smaller pieces.”

Johnson also defended his handling of the spending talks in a meeting with GOP House members on Thursday ahead of the vote.

According to sources in the room, Johnson said that he was forced into a position to cut the deal because GOP divisions have prevented the House from approving a procedural step — known as a rule — along party lines. That has meant he needs to rely on Democrats to pass a bill on a two-thirds majority, forcing them to compromise on the spending package.

Rep. Marjorie Taylor Greene of Georgia, who will vote against the stopgap bill, swiped at the speaker over cutting a deal with Democrats on government funding.

“Well, I’ve kind of brought back the name ‘House of hypocrites’ because our conference was all about no CRs, no CRs, no minibuses, no omnibuses. And all I heard talked about this morning was we’re on our third CR … so that we can vote on multiple mini-buses,” she told CNN’s Manu Raju.

Rep. Byron Donalds of Florida, who opposes the deal cut by the speaker, said it’s been “a tough six months.”

“I don’t agree with the package,” he told CNN, adding, “In this game you got to stack up your fights, you got to stack up your strategies. And I just don’t think that’s what we accomplished here.”

“I think it could have been done in better ways, yeah. But, I mean, you can’t be a Monday morning quarterback on this thing,” he told CNN when asked about how Johnson has handled the majority. “We are where we are.”

Johnson won the gavel after conservatives ousted former House Speaker Kevin McCarthy in a historic vote last year, raising the question of whether the Louisiana Republican may at some point face a similar threat against his speakership.

Rep. Tim Burchett of Tennessee, who was one of the eight Republicans who voted to oust McCarthy, said he opposed the stopgap bill and broader funding deal but was sympathetic to Johnson’s circumstances.

“Of course I haven’t voted for a CR. I think we need to pass a budget, but the reality is nobody wants to do that. And he has one vote majority. And so he’s up against the wall. He’s going to have to make a tough decision. I support him. I don’t necessarily support the CR,” he told CNN. “The reality is that he’s working hard and he’s just doing what he can do.”

The six funding bills that lawmakers have reached an agreement on and plan to pass before March 8 include departments of Agriculture-FDA, Commerce-Justice and Science, Energy and Water Development, Interior, Military Construction-Veterans Affairs and Transportation-Housing and Urban Development.

The remaining six appropriations bills that lawmakers plan to vote on prior to March 22 are Defense, Financial Services and General Government, Homeland Security, Labor-Health and Human Services, the Legislative Branch and State and Foreign Operations.

(Copyright (c) 2024 CNN. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox