The US Senate has voted to reopen the federal government after a two-day shutdown.

The shutdown began at midnight on Saturday after Democrats derailed a Republican measure that would have kept government open until February 16.

Democrats wanted to pressure the GOP to cut a deal protecting young immigrants from deportation and boosting federal spending.

Moderates from both parties pressured leaders to end the shutdown and compromise.

Senate Minority Leader Chuck Schumer said Democrats agreed to back the bill reopening government after he and Senate Majority Leader Mitch McConnell agreed to begin debating an immigration bill by February 8.

The vote was 81-18 in favour - well above the 60 votes needed.

The Senate still must vote on final passage to send the bill to the House.