The US Senate has passed a crucial funding bill that could bring the longest government shutdown in history to an end within days.
The bill passed in a 60-40 vote late on Monday, with nearly all Republicans joining eight Democrats who splintered from the party to approve it. The deal funds the government until the end of January.
The House of Representatives will now have to pass the bill before President Donald Trump can sign it into effect. Trump signalled he would be willing to do so earlier on Monday.
The deal came to fruition over the weekend, after some Democrats joined Republicans and negotiated an agreement to get federal employees back to work and essential services restarted.
Republicans - who hold a 53-47 majority in the Senate - needed the measure to clear the 60-vote minimum threshold.
Democratic Senators Dick Durbin, John Fetterman, Catherine Cortez Masto, Maggie Hassan, Tim Kaine, Jackie Rosen and Jeanne Shaheen broke from the rest of their party to vote in favour of the funding bill.
They were joined by Maine's Angus King, an independent who caucuses with the Democrats, who also voted to reopen the government.
Only one Senate Republican - Kentucky's Rand Paul - voted with the majority of Democrats against it.
The announcement of the bill's passage was made to a largely empty room, but the senators who stayed until the end cheered and applauded.
We are going to reopen government, we are going to ensure that federal employees... will now receive compensation that they're earned and deserve, Senator Susan Collins, a Republican who played a key role in authoring the bill, said after it passed.
Many government services have been suspended since October, and around 1.4 million federal employees are on unpaid leave or working without pay.
The shutdown has had wide ranging impacts on a variety of services, including US air travel and food benefits for 41 million low-income Americans.
On Monday, more the 2,400 flights across the US were cancelled according to airline traffic tracker FlightAware. At least 9,000 were delayed.
The funding bill will now go to the Republican-controlled House of Representatives, where members have been out of session and away from Washington since mid-September.
On Monday, with the Senate deal seemingly in reach, House Speaker Mike Johnson called members of his chamber back to Washington.
The House will begin discussing the measure on Wednesday, although it is unclear exactly how much time that process may take.
The deal negotiated over the weekend extends funding for the federal government until 30 January.
It also includes full-year funding for the Department of Agriculture, as well as funding for military construction and legislative agencies.
Guarantees that all federal workers will be paid for time during the shutdown, and funding for the Supplemental Nutrition Assistance Program (SNAP) - which provides food aid to one in eight Americans - until next September are also included in the bill.
The package includes an agreement for a vote in December on extending healthcare subsidies that are due to expire this year, a key issue Democrats had been holding out for concessions on.
The agreement was negotiated between Senate Majority Leader John Thune and the White House, with Democratic Senators Jeanne Shaheen and Maggie Hassan of New Hampshire, and Angus King of Maine, an independent who caucuses with the Democrats.
Some high-profile Democrats have been highly critical of colleagues who sided with Republicans to end the shutdown without concrete guarantees on healthcare, with California Governor Gavin Newsom earlier calling the decision pathetic.
Senator Chuck Schumer, the minority leader in the chamber, said the package fails to do anything of substance to fix America's healthcare crisis.
Virginia Senator Tim Kaine was among the group of Democrats who voted in favour of the compromise. He pushed back on that criticism, and said the federal workers he represents were saying thank you for agreeing the deal.
Senate Majority Leader John Thune has promised to take up the healthcare subsidies measure by the second week of December, but in the House, Johnson has said he will not bring the measure for a vote.
Trump, meanwhile, signalled earlier on Monday that he would be willing to sign the funding bill into effect if it passes the House.
We'll be opening up our country very quickly, he told reporters in the Oval Office, adding: the deal is very good.























