The House of Representatives narrowly passed a $1.2 trillion federal spending package along bipartisan lines on Friday, taking a step closer to averting a partial government shutdown at midnight.

The legislation was expedited onto the House floor via suspension of the rules, which bypasses procedural hurdles in exchange for raising the threshold for passage from a simple majority to two-thirds. It passed by a 286 to 134 vote.

More Republicans voted against the bill than for it – 112 GOP lawmakers opposed the bill and 106 voted for it. Just 22 Democrats voted against it.

HOUSE PASSES $460 BILLION GOVERNMENT FUNDING BILL BLASTED BY GOP HARDLINERS

Mike Johnson

House Speaker Mike Johnson ushered a massive $1.2 trillion spending deal through the House.

The package, comprised of six appropriations bills that account for roughly 70% of discretionary government spending, was unveiled around 3 a.m. on Thursday night. It is aimed at funding the government through the remainder of fiscal year 2024, which ends Sept. 30. 

It puts Congress one step closer to ending a monthslong war that has spurred historic levels of dysfunction within the House GOP's razor-thin majority.

The bill is aimed at funding the departments of Defense, Homeland Security, Education, Health & Human Services and the legislative branch.

Both Republican and Democratic negotiators walked away declaring victory on striking a deal – Johnson touted cuts to funding for non-governmental organizations, a 6% cut to overall foreign aid funds, and policies like banning the State Department from flying non-official flags at diplomatic facilities.

GOP HARDLINERS FURIOUS AT JOHNSON FOR PASSING ANOTHER SHORT-TERM SPENDING BILL WITH DEMS: 'USUAL C--P'

Senate Majority Leader Charles Schumer speaks

The bill now heads to Democratic Senate Majority Leader Charles Schumer. (Kevin Dietsch/Getty Images)

Democrats cheered the exclusion of enforcement measures of the House GOP’s H.R.2 border security bill – something conservatives demanded in order to fund the Department of Homeland Security – as well as increased federal child care funding and a $1 billion increase for climate and green energy programs.

Both GOP hardliners and rank-and-file conservatives panned the bill for its exclusion of those border enforcement measures. 

HOUSE SPEAKER JOHNSON SAYS WHITE HOUSE DOESN'T 'CALL THE SHOTS' ON WHEN IMPEACHMENT IS OVER

Rep. Nicole Malliotakis, R-N.Y., normally a reliable vote for GOP leaders, posted on X ahead of the package's consideration, "I have a real problem with giving the Biden Administration more money without changes to his border policy. I will not fund his reckless agenda that includes the transportation & housing of more illegal immigrants, including criminals, in New York City & across America."

Conservatives were also livid that the House got less than 48 hours to review the bill before the final vote, accusing GOP leaders of violating an earlier promise to give members at least 72 hours to review the bill's text. Johnson's office blamed the White House for dragging out negotiations.

Rep. Nicole Malliotakis

Rep. Nicole Malliotakis was among the rank-and-file Republicans coming out against the bill. (Drew Angerer/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Speaker Mike Johnson's handling of the bill prompted Rep. Marjorie Taylor Greene, R-Ga., to file a motion to oust him from leadership – though she told reporters afterward it was more of a "warning."

The package did score support from conservative groups like FreedomWorks and Americans for Tax Reform, industry groups, veterans' groups like With Honor Action, and pro-Israel organizations. 

It now heads to the Senate, which must act before midnight to avert a partial government shutdown.