On Wednesday, President Barack Obama signed legislation to fund the U.S. Department of Homeland Security through September, ending the possibility of the agency’s partial closure for this fiscal year.

The House of Representatives passed the funding measure 257-167 Tuesday. The Senate had previously approved the legislation.

The House’s approval of a “clean” funding bill without immigration riders ended weeks of Congressional wrangling over DHS. Republicans had sought to tie DHS funding to reversal of Obama’s executive actions to provide relief from deportation to approximately 5 million undocumented immigrants.

The timing of the vote Tuesday came as a surprise to many people, since the new spending deadline was not until Friday. A partial shutdown of DHS was averted by just hours last Friday, when Congress extended funding for one week.

Obama’s immigration policies, meanwhile, remain tied up in court. A federal judge in Texas temporarily blocked a key part of the program Feb. 16. The Obama administration is appealing the ruling.

Copyright © 2016 Berry Appleman & Leiden LLP. All rights reserved. Reprinting or digital redistribution to the public is permitted only with the express written permission of Berry Appleman & Leiden LLP. For inquiries please contact copyright@bal.com.