The measure still needs to be approved by the House and signed by US President Donald Trump.

The record shutdown is now in its 39th day and has affected everything, from food aid to air travel.

The Senate may be close to an agreement to fund the government and end the longest government shutdown in U.S. history.