The U.S. Capitol building is pictured at sunset on Capitol Hill in Washington
The U.S. Capitol building is pictured at sunset on Capitol Hill in Washington, U.S., November 22, 2019. Reuters

Democrats and Republicans in the U.S. Congress were moving forward with a $1.66 trillion government funding bill, scrambling to pass the measure, which includes record military spending, before temporary funding runs out at the end of the week.

The total funding proposed by the bill is up from the approximately $1.5 trillion appropriated the previous year.

The sweeping bill includes other measures agreed on by negotiators from both parties, including a ban on the use of TikTok on government-owned devices and clarification of Congress's role in certifying elections, an attempt to avoid a repeat of the violence of Jan. 6, 2021.

Leaders in the Senate and the House of Representatives aim to pass the bill and send it to Democratic President Joe Biden by the end of the week to ensure no interruptions to the government's activities.

Failure to pass the package could bring a partial government shutdown beginning Saturday, just before Christmas, and possibly lead into a months-long standoff after Republicans take control of the House on Jan. 3, breaking the grip of Biden's Democrats on both chambers of Congress.

Included in the bill is $44.9 billion in emergency assistance to Ukraine and NATO allies and $40.6 billion to assist communities across the United States recovering from natural disasters and other matters.

This would be on top of the record $858 billion in military spending for the year, which is up from last year's $740 billion and also exceeds Biden's request.

Democrats and Republicans alike had aimed to tuck as many legislative wish-list items as possible into the "omnibus" bill funding the government through the end of this fiscal year on Sept. 30, 2023, without derailing the whole package.

Negotiators worked through the weekend to put the finishing touches on the bill, which still could be amended by the full House or Senate.

"From funding for nutrition programs and housing assistance, to home energy costs and college affordability, our bipartisan, bicameral, omnibus appropriations bill directly invests in providing relief from the burden of inflation on the American people," Democratic Senator Patrick Leahy said in a statement.

Among the most significant add-ons is the bipartisan Electoral Count Act, which overhauls and clarifies Congress' certification process for presidential elections.

Democrats and many Republicans see the measure as crucial to avoiding a repeat of the chaos that occurred almost two years ago when a mob of Donald Trump supporters attacked the Capitol building in an attempt to overturn Biden's victory.

U.S. lawmakers also included a proposal to bar federal employees from using Chinese app TikTok on government-owned devices. And they backed a proposal to lift a looming deadline imposing a new safety standard for modern cockpit alerts for two new versions of Boeing Co's 737 MAX aircraft.

Boeing and aviation unions lobbied for the inclusion of that provision, while safety advocates - including relatives of those who died in 737 MAX plane crashes - pushed back hard.