The House passed a temporary government funding bill Tuesday to hold off a shutdown for a few more weeks.

The bill would fund the government at current levels through Dec. 20. The chamber passed it by a 231-192 margin. Only 12 Republicans supported the measure.

The legislation now heads to the Senate. Mitch McConnell, Senate majority leader, said Monday that the White House indicated President Donald Trump would support a plan to keep the government running through Dec. 20. The president's backing suggests the GOP-held Senate will pass the measure.

Funding will lapse Friday if Congress cannot pass a plan.

The so-called continuing resolution gives lawmakers a few more weeks to strike a deal on long-term appropriations. Congress passed a two-year agreement to set budget levels and suspend the U.S. debt limit earlier this year.

However, the House and Senate have struggled to agree on where exactly to put the money amid disputes over border security funding.

Lawmakers hope to dodge only the latest shutdown of the Trump era in Washington. A partial government funding lapse that started in December 2018 lasted a record 35 days.

Subscribe to CNBC on YouTube.