Updated

The House of Representatives on Thursday overwhelmingly approved a $146 billion spending bill to fund the Energy Department, veterans' programs and the legislative branch as part of a bid to avoid a government shutdown Oct. 1.

The measure passed the House by a 377-20 vote, one day after the Senate passed it by a 92-5 vote. Eighteen Republicans and two Democrats voted no on the bill, which goes to President Trump for approval.

The White House has indicated that Trump will sign the so-called "minibus" package, which accounts for three of the 12 annual spending bills that fund the government and is the first of three such measures Congress has aimed to approve this month.

Also Thursday, legislative leaders unveiled a stopgap bill to fund the rest of the government through Dec. 7. Rep. Rodney Frelinghuysen, R-N.J., chairman of the House Appropriations Committee, said the short-term plan would be added to a separate spending bill that lawmakers are negotiating to cover the Defense Department and labor, health and education programs.

The stopgap bill would not address Trump's long-promised wall along the U.S.-Mexico border. GOP leaders have said they'd prefer to resolve the issue after the Nov. 6 elections.

The bill represented a marked departure from recent years, when Congress routinely ignored agency-specific spending measures in favor of massive so-called "omnibus" packages that funded the entire government at once. Trump said earlier this year that he would not sign another such bill.

The three "minibus" plans, if passed by Congress and signed by Trump, would account for nearly 90 percent of annual federal spending, including the military and most civilian agencies.

However, the president has held out the possibility of a government shutdown, citing the need to protect the nation's border by following through on his signature campaign promise.

"If it happens, it happens," Trump said last week. "If it's about border security, I'm willing to do anything."

Fox News' Chad Pergram and The Associated Press contributed to this report.