Congress has staved off another shutdown as the House late Friday approved a bill to fund the Homeland Security Department for one week, with just two hours before a midnight deadline.

The vote late Friday was 357-60 as Democrats joined majority Republicans in backing the bill that averts a partial government shutdown. Another possible short-term solution earlier Friday failed to even make it out of the Republican-controlled House.

The proposal would have funded the federal agency for another three weeks, allowing Congress more time to come to a compromise. Now with just a week of funding, it will be back to square one with lawmakers, who will have all next week to come to an agreement on how to fund DHS in the long term.

If Congress didn't come to a decision at midnight, about 30,000 employees at the Department of Homeland security would have been furloughed.