The amended package will still have to be passed by the House and sent to Trump for his signature, a process that could take days

The Senate on Sunday made significant progress towards ending the longest US government shutdown in history, narrowly advancing a compromise bill to reauthorize funding and undo the layoffs of some employees.

But the measure, which resulted from days of talks between a handful of Democratic and Republican senators, leaves out the healthcare subsidies that Democrats had demanded for weeks. That appears set to cause turmoil for the legislation in the House of Representatives, where the top Democrat and several of his lawmakers have announced their opposition.

On a procedural vote in the Senate held hours after the compromise emerged, the bill cleared the 60-vote threshold for advancement.

“After 40 long days, I’m hopeful we can bring this shutdown to the end,” said John Thune, the Republican Senate majority leader.