A general view of the U.S. Capitol Hill is seen behind the autumn leaves in Washington, U.S., November 13, 2019. REUTERS/Yara Nardi

WASHINGTON (Reuters) - The U.S. House of Representatives on Tuesday approved legislation to avert a widespread government shutdown later this week with a bill extending temporary federal funding through Dec. 20.

The legislation passed the House by a vote of 231-192, with all but a dozen Republicans voting against the funding.

It now goes to the Senate, which will aim to approve it before midnight Thursday when existing funds expire. Senate Majority Leader Mitch McConnell on Monday said the White House had indicated its support for the bill.

This second stop-gap bill since September is needed because Congress has not completed a series of regular appropriations bills for the fiscal year that began on Oct. 1.

That in part is because of disagreements between Republican President Donald Trump and Democrats, who control the House, over the billions of dollars he wants to build a U.S.-Mexico border wall.

The same disagreements resulted in a record-long, 35-day partial government shutdown that began late last December and extended into early 2019.