This post has been udpated

The House passed a bill Tuesday afternoon to fund the Department of Homeland Security for the rest of the fiscal year, sending it to President Obama for his expected signature. The measure will not target Obama's executive actions on immigration, giving Democrats what they have long demanded and potentially enraging conservatives bent on fighting the president on immigration.

The vote was 257-167, with some Republicans joining all Democrats who voted to pass the bill, which had already cleared the Senate.

“As you’ve heard me say a number of times, the House has done its job by passing legislation to fund DHS and block the president’s executive actions on immigration," Speaker John A. Boehner (Ohio) told rank-and-file Republicans in a Tuesday morning meeting, according to a person in the room. "Unfortunately, the fight was never won in the other chamber."

The vote marked a big win for Democrats, who have long demanded that Congress pass a "clean" bill to fund DHS free of any immigration riders. For weeks, Boehner and his top deputies have refused to take up such a bill, as conservatives have demanded using the DHS debate to take on Obama's directives, which include action to prevent the deportations of millions of undocumented immigrants.

Sen. Charles E. Schumer (N.Y.), the third-ranking Senate Democrat, said he was "pleased" House Republicans cleared the way for the DHS bill to pass but added that he feared future showdowns fueled by House conservatives would seriously imperil the future work of Congress. "I also shudder for the future of this Congress," he said.

The person in Tuesday's meeting, granted anonymity to describe internal strategy, said Boehner presented Republicans with three options: another stopgap bill, taking up a "clean" bill that has already passed the Senate and a Friday-into-Saturday shutdown of DHS.

Boehner said because of threats facing the country, a shutdown would not be acceptable. And a stopgap bill probably would not pass, he said.

Boehner's original plan for a three-week bill to keep the debate going was stunningly defeated last week amid a revolt of dozens of Republicans who joined most Democrats to sink it. The House and Senate had to scramble to pass a one-week funding extension after Boehner's plans were thwarted.

The House passed its own bill weeks ago that would fund DHS for the rest of the fiscal year and would also undo Obama's immigration actions. Senate Democrats blocked that bill four times. On Monday, Senate Democrats blocked a House GOP effort to form a conference committee to hash out the differences between the House and Senate bills, leaving the next move up to Boehner.

Outside the halls of Congress, Boehner's allies moved to pressure conservatives to fund DHS Tuesday. American Action Network, a nonprofit supportive of GOP leadership, launched a campaign against Republicans who have refused to do so. The ad campaign includes a TV, radio and online component. It targets several members of the House Freedom Caucus, including Rep. Jim Jordan (R-Ohio).

Rep. John Fleming (R-La.), another member of the Freedom Caucus, which is a small group of hard-line conservatives who have clashed with Boehner, said he opposed the bill.

"I don't want to do anything that would fund unlawful, unconstitutional behavior by the president," he said.

Rep. Charlie Dent (R-Pa.) dismissed the suggestion that Boehner may suffer politically among conservatives as a result of the DHS debate.

"Passing the Homeland Security appropriations bill is the right the to do. I believe that the speaker will be just fine," said Dent.​