The US Congress averted a government shutdown early Saturday after weeks of negotiations that went down to the wire, as the Senate rubber-stamped a bill passed earlier by the House to fund federal agencies through mid-March.