The US House of Representatives has narrowly passed a $1.1 trillion spending bill to avert a government shutdown less than three hours before a midnight deadline, overcoming strenuous Democratic objections to controversial financial provisions.

Senate Democratic leader Harry Reid said the Senate would begin that debate today.

Shortly after the 219-206 vote, the House passed a 48-hour extension of funding to keep government offices open while the Senate considers the broader measure.

The spending bill was nearly killed earlier by a revolt among Democrats over provisions to roll back part of the Dodd-Frank financial reform law and allow more big money political donations.

But President Barack Obama and his administration waged a last-ditch campaign to persuade Democrats to set aside their objections, arguing that if it failed, the party would get a worse spending deal next year when Republicans take control of the Senate and have a stronger House majority.

The effort to save the bill marked a rare moment of teamwork between Obama and House Speaker John Boehner, who simultaneously worked to persuade conservative Republicans to support it.

In the end, 67 Republicans voted against the measure, largely because it failed to take action to stop Obama's executive immigration order. But that was offset by 57 Democrats who voted in favour.

The 1,603-page measure, negotiated by Republican and Democratic appropriators and leaders, drew Democrats' ire when they discovered it would kill planned restrictions on derivatives trading by large banks, allowing them to continue trading swaps and futures in units that benefit from federal deposit insurance and Federal Reserve loans.

If passed by the Senate, the spending bill would provide the Department of Homeland Security with funds through 27 February.

Republicans intend to deny funding to the agency to carry out Obama's order allowing millions of undocumented immigrants to stay and work in the United States.