The Senate on Friday approved a Republican bill to fund federal agencies through September, averting a government shutdown hours before the midnight deadline after Democrats relented.

The bill passed the Senate in a 54-46 vote, overcoming steep Democratic opposition. On Saturday, Donald Trump signed it into law, the White House said.