The Senate on Thursday passed a short-term government funding bill for President Trump's signature, ending yet another threat of a government shutdown and leaving Congress with a new January deadline to come up with a major spending deal.

Democrats were needed to pass the bill in the Senate, where 60 votes are required on most legislation. The bill passed 66-32, and President Trump has until the end of Friday to sign it into law to avoid a partial government shutdown.

Democrats who voted for the bill included Sens. Tom Carper and Chris Coons of Delaware, Tim Kaine of Virginia, Maggie Hassan and Jeanne Shaheen of New Hampshire, Joe Manchin of West Virginia, Bill Nelson of Florida, Debbie Stabenow and Gary Peters of Michigan, and Claire McCaskill of Missouri.

Democrats had demanded the bill include a provision to legalize so-called Dreamers, but mostly backed down after bipartisan negotiations moved along and Republican leaders pledged a January vote on a limited immigration reform bill.

House Minority Leader Nancy Pelosi, D-Calif., led a majority of House Democrats to vote against the bill because it lacked the Dreamer language, but in the Senate, Democrats would have faced blame for a partial government shutdown because they are needed to pass legislation in the upper chamber.

The vote on the stop-gap spending bill is likely the last action Congress will take this year.

The Senate did not vote on a House-passed bill to provide $81 billion in disaster aid to fire and hurricane-damaged states and territories. The disaster relief bill did not have support from Democrats and a few Republicans who say the funding level should be increased.

The short-term bill keeps the federal government funded until Jan. 19 and includes the same extension for authorization of a counter terrorism spying tool that was set to expire at the end of the month.

It provides additional funding for a few defense priorities, including critical ship repairs. The measure also extends funding until March for the Children's Health Insurance Program.

Democrats and Republicans will return in January with mere weeks to work out a massive bipartisan spending deal. The two parties aim to lift federally imposed spending caps, but conservatives want more money for defense, while Democrats will demand parity for domestic budgets.

The deal could wrap in the limited immigration reform measure, which will likely legalize Dreamers, fund a southern border wall and perhaps limit chain migration.

Republicans and Democrats must also strike a long-term deal to fund CHIP and will have to reauthorize Section 702 of the Foreign Intelligence Surveillance Act, or FISA. Lawmakers in both parties say the surveillance tool must be changed to protect privacy and prevent it from being abused for political purposes.