Pending President Obama's official approval of the bill, he signed a measure into law Saturday afternoon that would keep agencies open through Dec. 23.
The vote came on a conference report of an omnibus spending package. Democrats this week held up a deal on the measure while negotiating over a payroll-tax holiday for workers and other year-end measures.
Congress on Friday passed a one-day continuing resolution to keep government funded past the expiration last night of a prior continuing resolution.
Correction: The original version of this article indicated that Obama had signed legislation funding agencies until the end of the fiscal year. The measure he signed only keeps agencies open until Dec. 23.