The Senate has passed legislation to reopen the government, bringing the longest shutdown in history closer to an end after a small group of Democrats struck a deal with Republicans.

The shutdown could last a few more days as members of the House, which has been on recess since mid-September, return to Washington to vote on the legislation.

President Donald Trump has signaled support for the bill.

The final 60-40 Senate vote on Monday broke a grueling stalemate that lasted more than six weeks as Democrats demanded that Republicans negotiate with them to extend health care tax credits.

The Republicans never did.