The Senate passed a spending deal Monday night to head off a threatened government shutdown over the handling of disaster aid, Senate officials said. The measure passed in a bipartisan vote of 79 to 12.

The apparent breakthrough came after the Federal Emergency Management Agency indicated it had enough money to squeak through the end of the fiscal year Friday night, eliminating one of the main points of partisan contention: whether to offset a quick infusion of funds to the agency with cuts elsewhere as House Republicans had insisted. Democrats in both the House and Senate had resisted that approach.