President Biden signed a stopgap bill to keep the government open until November 17.
The bill passed the House with an overwhelmingly bipartisan vote, but it did not include additional funding for Ukraine or border security.
House Speaker Kevin McCarthy announced the stopgap proposal after weeks of infighting among House Republicans.
McCarthy's decision to work with Democrats to avert a shutdown could put his speakership at risk.
Hardline conservatives are expected to force a vote to remove McCarthy as speaker, but it is not clear when that will happen.
A shutdown could have had consequential impacts across the country, but lawmakers were able to avoid a crisis at the last minute.