Congress passed a stopgap spending bill to prevent a government shutdown this weekend and buy time for challenging talks on a wide range of unfinished business on Capitol Hill.

The shutdown reprieve came as all sides issued optimistic takes on an afternoon White House meeting between top congressional leaders and President Donald Trump.

The measure passed the House 235-193, mostly along party lines, and breezed through the Senate on a sweeping 81-14 tally barely an hour later. It would keep the government running through Dec. 22, when another, and more difficult, shutdown problem awaits.

The bill now heads to Trump for his signature.

Topics at the White House session included relief from a budget freeze on the Pentagon and domestic agencies, extending a key children's health program and aid to hurricane-slammed Puerto Rico, Texas and Florida.