(CNN) — The House is expected to vote on Friday whether to pass key government spending legislation ahead of a fast-approaching shutdown deadline at the end of the day, the culmination of a months-long funding fight on Capitol Hill.

Friday’s tight timeline has sparked fears of a potential, partial shutdown at midnight, though top lawmakers on both sides of the aisle say they are pushing to prevent that.

The bill addresses a slate of critical government operations, including the departments of Defense, Homeland Security, Labor, Health and Human Services, Education, State and the legislative branch.

If the House passes the legislation, as is expected, it would next go to the Senate where lawmakers must reach agreement to swiftly approve the bill. If both chambers of Congress have not passed the legislation before the deadline, a temporary lapse in funding would take place, triggering a partial shutdown. The impact of a partial shutdown would be limited if funding is approved over the weekend before the start of the work week.

As of Thursday night, top House Republicans expected they’ll have the votes to pass the spending package – but it could be close. They’ll need a two-thirds majority to pass the bill, so Democrats will have to help carry it amid a revolt in some quarters of the House GOP Conference, according to senior GOP sources.

It remains unclear if the GOP can win a majority of their conference – a key threshold they try to achieve on every vote.

Lawmakers unveiled the $1.2 trillion government funding package just before 3 a.m. ET on Thursday, and the text is more than 1,000 pages long.

Senate Majority Leader Chuck Schumer said Thursday that the text for the legislative package came “in the nick of time,” with fewer than 48 hours out from the deadline for a partial government shutdown. The Democratic leader added, “Now Congress must now race to pass this package before government funding runs out this Friday. Once the House acts, the Senate will need bipartisan cooperation to pass it before Friday’s deadline and avoid a shutdown,” a reference to how any one one senator could slow passage of the bill and launch a partial shutdown.

After months of averting shutdowns at the eleventh hour with stopgap bills, Congress finally passed a package of six bills in early March to fund a slate of government agencies for the rest of the fiscal year.

Lawmakers must now fund the rest of the government to wrap up the annual federal funding process, which has dragged on far longer than is typical amid partisan policy disagreements and a historic change of leadership in the House after conservatives ousted former Speaker Kevin McCarthy in an unprecedented vote last year.

Speaker Mike Johnson, who won the gavel after McCarthy’s ouster, faces an extremely narrow majority and pushback from his right flank over his handling of the government funding fight.

Johnson praised the bill early Thursday morning, outlining conservative wins in the package.

“This FY24 appropriations legislation is a serious commitment to strengthening our national defense by moving the Pentagon toward a focus on its core mission while expanding support for our brave men and women who serve in uniform,” Johnson said in a statement.

The Louisiana Republican will need to rely on votes from both Democrats and Republicans to get the remaining government funding legislation across the finish line, a point of tension within the House GOP conference.

House members on both sides of the aisle lashed out Thursday over the agreement, with progressives and far-right members criticizing the legislation for different reasons.

GOP Rep. Chip Roy of Texas told CNN he won’t be supporting any Republican who votes for the bill and that leadership “owns the bill,” describing the bill as a “failure.”

“I would have a very difficult time doing that,” he told CNN’s Manu Raju. “The Republican conference is a failure if they pass this bill.”

House progressives have also been critical with some indicating they will vote against it over provisions that will withhold funding to United Nations Relief and Works Agency for Palestine Refugees for one year amid the alleged involvement of UNRWA employees in the October 7 attack against Israel.

McCarthy’s fate has raised questions over whether Johnson could face a similar threat to his speakership, but many Republicans have made clear they do not want another speaker’s race after the intense infighting and chaos triggered by McCarthy’s removal.

The separate six-bill funding package, which was signed into law by President Joe Biden earlier this month, included funding for the departments of Agriculture, Commerce, Justice, Veterans Affairs, Energy, Interior, Transportation, Housing and Urban Development, as well as the Food and Drug Administration, military construction and other federal programs.

(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