WASHINGTON (AP) — Die-hard House conservatives bungled a coup against House Speaker John Boehner but now look like winners, pushing Republicans farther right.

Rather than punish and isolate those who opposed him as leader, Boehner surprised many on Friday by embracing an immigration plan that’s tougher than lawmakers had expected. It would block President Barack Obama’s recent limits on deportations and undo protections for immigrants brought to the United States illegally as children.

The House is heading toward a vote Wednesday.

As the rebellious hard-liners celebrated, mainstream Republicans said Boehner’s decision probably portends firmly conservative approaches to other issues. That would complicate life for some of the more moderate Senate Republicans and ensure fierce battles with the Democratic president.

Florida Rep. Richard Nugent, one of the 25 House Republicans who voted to oust Boehner, praised the Boehner-backed immigration plan.

The dissidents have complained that Boehner, R-Ohio, is too willing to compromise with Obama and Democrats. But rather than seeing the rebels frozen out during private GOP discussions on immigration strategy, Nugent said, “this time it’s a very collaborative approach.”

For now, though, Nugent is still off the House Rules Committee, where membership is at the speaker’s discretion.

Equally enthusiastic was Rep. Louie Gohmert, a Texas Republican sometimes portrayed by Democrats as the most unreasonable of conservative purists.

“One of the things that has really been lacking for the last eight years is having more input like we’ve finally gotten in this bill,” Gohmert said.

Some Boehner allies had urged him to punish and isolate Gohmert and the other rebels.

But that approach might permanently antagonize tea party-leaning Republicans and “force Boehner into making more concessions” to Democrats to pass bills, “which is the last thing in the world we want,” said GOP Rep. Kenny Marchant of Texas, shortly after Tuesday’s leadership vote.

By Friday, Marchant was reassured. “The focus now is to solicit input and try to bring them into the fold,” he said.

Boehner’s agreement to nudge his caucus rightward, especially on immigration, could cause headaches for Republican presidential candidates needing Hispanic votes. It also will complicate life for Senate Republicans, who now hold the majority but generally cannot pass bills without at least six Democratic votes, thanks to filibuster powers.

“It probably makes it more difficult in the Senate, but we shouldn’t worry about what the Senate is going to do,” said Rep. Tom Cole of Oklahoma, often seen as a voice for Republican House leaders.

The approach, Cole said, “takes a lot of political pressure off House Republicans.” One reason that 25 Republicans voted against Boehner, he said Friday, “was because they didn’t believe we were going to do exactly what we’re doing today” on immigration.

The Senate is virtually certain to weaken such bills. House Republicans acknowledge they will face tough choices when it’s time to work out the differences.

“The litmus test is going to be what happens with this bill when it hits the Senate and comes back to us,” said GOP Rep. John Fleming of Louisiana, a staunch conservative who voted for Boehner as speaker.

In recent years, when the Republicans’ House majority was smaller, Boehner sometimes had to negotiate with Democrats for enough votes to pass measures that dozens of conservative Republicans refused to back. Doing so is politically risky for a speaker, and increasingly difficult now that centrist members of both parties have largely been driven from Congress.

At issue is a $39.7 billion spending bill to keep the Department of Homeland Security funded beyond February.

The House version would block Obama’s November order granting temporary relief from deportation to about 4 million immigrants who are in the country illegally. Most have been here at least five years and have children who are citizens or legal permanent residents.

In a surprise to many, the House GOP proposal also would reverse a 2012 program, called Deferred Action for Childhood Arrivals, that removed deportation threats to certain immigrants brought illegally to the U.S. as children.

Obama’s allies say he would veto such measures, should they survive Senate Democrats’ filibusters. Vetoes are difficult to override, requiring two-thirds votes in the House and Senate.

Congressional Republicans say it’s important to put their principles into legislation, even with the veto threat. It can be good politics, too.

In his conservative district between Dallas and Fort Worth, Marchant said, “a veto-override vote is OK with me.”

___

Associated Press writers Stephen Ohlemacher and Erica Werner contributed to this report.