President Joe Biden signs the bipartisan omnibus bill.
CNN  — 

President Joe Biden on Thursday signed a $1.7 trillion federal spending bill that includes a number of administration priorities and officially avoids a government shutdown, ending what he called a “year of historic progress.”

“It’ll invest in medical research, safety, veteran health care, disaster recovery, (Violence Against Women Act) funding – and gets crucial assistance to Ukraine,” Biden wrote in a tweet.

He added: “Looking forward to more in 2023.”

Biden signed the bill while vacationing on St. Croix in the US Virgin Islands. The bill was flown to him for signing, the White House said.

“The White House received the bill from Congress late afternoon on Wednesday. The bill was delivered to the President for his signature by White House staff on a regularly scheduled commercial flight,” a White House official told pool reporters.

It’s at least the second time this year that an important bill has been flown to Biden for his signature. While on a trip to Asia in May, a bill authorizing about $40 billion in aid to Ukraine was carried by a staffer who was already scheduled to travel to the region. Biden signed the bill while overseas.

The spending bill represents the final opportunity for Biden and Democrats to put their imprint on government spending before Republicans assume the majority in the House next week. It caps a remarkably productive two years legislatively for Biden, including a Covid-19 relief package, infrastructure bill and a China competitiveness measure.

The legislation includes $772.5 billion for nondefense discretionary programs and $858 billion in defense funding, according to a bill summary from Democratic Sen. Patrick Leahy, chair of the Senate Committee on Appropriations. That represents an increase in spending in both areas for fiscal year 2023.

The sweeping package includes roughly $45 billion in emergency assistance to Ukraine and NATO allies, an overhaul of the electoral vote-counting law, protections for pregnant workers, an enhancement to retirement savings rules and a ban on TikTok on federal devices.

It also will provide a boost in spending for disaster aid, college access, child care, mental health and food assistance, more support for the military and veterans and additional funds for the US Capitol Police, according to Leahy’s summary and one from Sen. Richard Shelby of Alabama, the top Republican on the Senate Appropriations Committee. And the legislation contains several major Medicaid provisions, notably one that could disenroll up to 19 million people from the nation’s health insurance program for low-income Americans.

However, the bill, which runs more than 4,000 pages, left out several measures that some lawmakers had fought to include. An expansion of the child tax credit, as well as multiple other corporate and individual tax breaks, did not make it into the final bill. Neither did legislation to allow cannabis companies to bank their cash reserves – known as the Safe Banking Act – or a bill to help Afghan evacuees in the US gain lawful permanent residency. And the spending package did not include a White House request for roughly $10 billion in additional funding for Covid-19 response.

The spending bill, which will keep the government operating through September – the end of the fiscal year, is the product of lengthy negotiations between top congressional Democrats and Republicans.

Congress originally passed a continuing resolution on September 30 to temporarily fund the government in fiscal year 2023, which began October 1.

This story has been updated with additional details.

CNN’s Kevin Liptak, Tami Luhby and Katie Lobosco contributed to this report.