The Republican-led House of Representatives backed down Tuesday in a dispute that could have led to a partial shutdown of the agency overseeing U.S. borders, handing a major victory to President Barack Obama.

Congress sent Obama a bill to fund the Homeland Security Department through the end of the budget year, without overturning the President's immigration policies. Republican leaders did not give in to conservatives' demand that the bill also roll back Obama's directives sparing millions of immigrants from deportation. Democrats had insisted on legislation to fund the department, which shares responsibility for anti-terrorism operations, without any conditions.

The House voted 257-167 in favour of the $40-billion spending bill, which Obama was expected to sign promptly. All 182 Democrats present voted for the bill, while it received only 75 Republican "yes" votes.

Story continues below advertisement

The Republicans' retreat underscored the limits on their power despite the party's widespread gains in November's elections. House Speaker John Boehner outlined the dwindling options for his deeply divided Republican caucus on Tuesday morning after the Senate left the House with little choice. Boehner pointed out that the issue of Obama's executive actions on immigration last fall is now in the hands of the courts.

"I am as outraged and frustrated as you at the lawless and unconstitutional actions of this president," Boehner told his caucus, according to aides. "I believe this decision – considering where we are – is the right one for this team, and the right one for this country."

House Republicans said that after months spent railing against Obama's executive actions, which most Republicans view as an unconstitutional overreach, they had no more moves to make.

A federal court ruling has temporarily blocked the administration from implementing the new immigration rules. The administration has appealed the decision, and the ultimate result of the legal challenge is unknown.

The Republican leadership's decision angered several conservatives, while some Republicans welcomed Boehner's move.

Representative Mike Simpson said he, too, opposes Obama's executive actions on immigration. Yet he also said the "security of the homeland is one of our highest priorities," and added that Congress could continue to oppose the president without forcing a partial agency shutdown that loomed for Friday.

Whatever the final result of the struggle, controversy over the legislation has produced partisan gridlock in the first several weeks of the new Congress. For the first time in Obama's presidency, Republicans have full control of Congress after capturing the Senate in November. They also won more seats in the House than at any time in 70 years.

Story continues below advertisement

Democratic unity blocked passage in the Senate of House-passed legislation with the immigration provisions. By late last week, a split in House Republican ranks brought the department to the brink of a partial shutdown. That was averted when Congress approved a one-week funding bill that Obama signed into law only moments before a midnight Friday deadline.

Erica Werner and David Espo contributed to this report.