U.S. congressional leaders early Tuesday unveiled a more than $1.6 trillion spending and policy plan to fund the government through the end of next September, including billions of dollars in new aid for Ukraine to fight its war against Russia, a 10% boost in defense spending and revised controls on certifying the election of U.S. presidents.

The measure, which also includes about $40 billion to help U.S. communities recover from drought, hurricanes and other natural disasters, is likely to be the last major piece of legislation that lawmakers will consider in the current session of Congress.

But the 4,155-page bill must be approved by midnight Friday, when current, temporary funding expires, or lawmakers will face the prospect of a partial government shutdown heading into the Christmas holiday this coming weekend.

If the measure is not passed, lawmakers could approve another temporary funding bill extending into next month. Some Republican lawmakers favor that outcome because they will narrowly control the House of Representatives when the new session of Congress opens on January 3, which could give them leverage in negotiating spending policies with the Democratic-controlled Senate and Democratic President Joe Biden.

The proposal includes $772.5 billion for non-defense discretionary programs and $858 billion in defense funding.

Included in the package is about $45 billion in emergency assistance to Ukraine as it battles Russia’s 10-month invasion, the biggest single allocation yet for the Kyiv government, although piecemeal measures for Ukraine have already totaled about $68 billion. The congressional proposal for Ukraine would top Biden’s $37 billion request.

The overall end-of-year proposal wraps in other measures that have languished as stand-alone bills. Various provisions would improve the country’s readiness for future disease pandemics and ban the use of Chinese-owned TikTok on government-owned devices.

It also tightens the rules under which lawmakers can object to the final vote counts submitted by each of the 50 states when Congress meets every four years to certify the outcome of presidential elections. Dozens of Republican lawmakers supporting former President Donald Trump objected to declaring Biden the winner when Congress met on January 6 last year to certify the outcome of the 2020 election, on a day when about 2,000 Trump supporters stormed the Capitol to try to keep Congress from acting.

As it stands now, only one senator and one member of the House of Representatives is needed to contest the outcome of the presidential vote in any state. But the new proposal would require at least 20 of the 100 senators and 87 of the 435 House members to object before their protest could be considered.

The legislative proposal also clarifies an 1887 law to explicitly say that the vice president’s role in counting the Electoral College votes from throughout the country is ceremonial and does not give the vice president the right to overturn the outcome of the election. Trump claimed erroneously last year that then-Vice President Mike Pence had the right to upend Biden’s victory and keep Trump in power for another four years.

In the United States, presidents are not elected by national popular balloting, although Biden won 7 million more votes than Trump. Instead, presidents are elected in the Electoral College, depending on the state-by-state outcome in each of the 50 states, with the most populous states having the most electors and thus the most sway on the national outcome.

Senate Majority Leader Chuck Schumer said in the early hours of Tuesday, “Nobody wants a shutdown, nobody benefits from a shutdown, so I hope nobody will stand in the way of funding the government ASAP. Finalizing the omnibus [spending bill] is critical, absolutely critical for supporting our friends in Ukraine.”

Shalanda Young, director of the government’s Office of Management and Budget, said in a statement that neither Republicans nor Democrats got everything they wanted in the deal. But she praised the measure as “good for our economy, our competitiveness, and our country, and I urge Congress to send it to the president’s desk without delay.”

But some Republicans threatened to hold up the measure to push the funding debate into January to give them new leverage, even as Senate Republican leader Mitch McConnell said his party had curtailed Biden spending plans in the proposal announced Tuesday.

But House Republican leader Kevin McCarthy, who is attempting to become the new House speaker in two weeks, assailed his Republican counterparts in the Senate for even negotiating with Democrats.

Another Republican, Congressman Chip Roy, a member of the conservative House Freedom Caucus, complained on “Fox News Sunday” this past weekend, “Republicans are about to literally give the Biden administration a blank check. Republican leadership in the Senate — and frankly, too many in the House — are walking away from using that important tool to check the executive branch.”