|Posted by George Freund on March 1, 2015 at 11:30 PM|
28 February 2015 Last updated at 00:53 ET
House Speaker John Boehner had earlier failed to get dozens of Republicans to back his stance
The US Homeland Security Department has avoided a partial shutdown as Congress passed a one-week funding extension, hours before a midnight deadline.
The House of Representatives voted 357-60 in favour of the short-term bill after it had been passed in the Senate.
President Barack Obama, who said he would back a short-term deal to avert a shutdown, signed it shortly afterwards.
It ensures the department's 250,000 employees will be paid while a longer-term funding agreement is discussed.
The two-thirds majority vote was reached about two hours before the midnight (05:00 GMT Saturday) deadline.
Earlier, Republicans had rejected a similar three-week extension after provisions against President Obama's immigration plan were dropped.
The one-week deal was backed by a majority of Democrats despite many of them voting against the earlier bill in the hope that a longer-term deal could be agreed.
The move came shortly after President Obama had spoken by phone to Democratic leaders in a bid to avert the partial department closure.
The Department of Homeland Security is responsible for securing US borders, airports and coastal waters.
About 200,000 "essential" department employees would have continued to work without pay if the agency's funding had not been secured.
Homeland Security Secretary Jeh Johnson called for full funding of the department
Effects of a Homeland Security shutdown
Airport security agents required to work without pay
Employers would not have the ability to use a programme called E-Verify to check if new employees are authorised to work legally in the US
No grants made to local and state authorities, including for training and new equipment
Secret Service will not be able to hire agents to protect 2016 presidential candidates
Civil rights and civil liberties complaint lines and investigations will be shut down
Some Republicans had wanted to use the funding of the department, which includes immigration officials, as a bargaining chip to force President Obama to end policies on immigration.
Last November, Mr Obama used his executive powers to protect about five million undocumented immigrants from deportation. Republicans say Mr Obama overstepped his powers in doing so.
A separate ruling by a federal judge has blocked those policies from starting while a lawsuit by more than two dozen states goes forward.
The White House said Mr Obama would sign a short-term measure to prevent a shutdown
Some Republicans senators had expressed a desire to fight the executive actions in the courts, rather than threaten the department's funding.
The BBC's Naomi Grimley in Washington says many on Capitol Hill feared a public backlash if the funding had been thrown into doubt at a time of fears about "lone wolf" terrorists.
Will undocumented people come forward amid uncertainty?
On Thursday, Homeland Security Secretary Jeh Johnson urged Congress to pass full funding.
"A short-term continuing resolution exacerbates the uncertainty for my workforce and puts us back in the same position, on the brink of a shutdown just days from now," Mr Johnson said.
Last week, the White House said Mr Obama would prefer a full funding bill but would sign a short-term measure to prevent a shutdown.
United States National Debt $18,159,169,065,695.29
United States National Debt Per Person $56,647.45
United States National Debt Per Household $146,716.89
Total US Unfunded Liabilities $123,285,917,470,968.50
Social Security Unfunded Liability $15,111,055,619,762.96
Medicare Unfunded Liability $79,028,484,560,451.23
Prescription Drug Unfunded Liability $19,944,322,897,155.32
National Healthcare Unfunded Liability $9,202,054,393,598.96
Total US Unfunded Liabilities Per Person $384,589.88
Total US Unfunded Liabilities Per Household $996,087.80
United States Population 320,564,639