This item has been updated.

House Republicans voted Wednesday to undo years of President Obama's immigration policies, launching a fresh attack on his executive actions as part of a plan to renew funding for the Department of Homeland Security.

But in doing so, Republicans exposed fresh rifts in their expanded ranks as more than two dozen members, mostly from suburban districts in swing states, voted against plans to end a program granting temporary legal status to hundreds of thousands of “dreamers” — or children brought to the country illegally by their parents who have served as the emotional centerpiece of the years-long debate.

House approval of the spending bill is just the opening act in a debate expected to stretch into late February, when homeland security expires. Legal challenges to Obama’s immigration orders, led by Republican state attorneys general, are underway. A senior GOP lawmaker suggested Wednesday that House and Senate leaders might also file suit.

The bill passed 236 to 191 with the support of two moderate Democrats. But 10 Republicans voted against the final bill. Earlier, 26 Republicans — including several new members from suburban districts around Chicago, Las Vegas, Miami and Philadelphia — joined Democrats in voting against a proposal to end Obama’s Deferred Action for Childhood Arrivals program.

Rep. Mario Diaz-Balart (R-Fla.), a veteran Miami Republican who was among those to vote against the bill and the DACA amendment, said that his party won't be able to settle the immigration fight until it negotiates a bipartisan compromise with Obama.

“Regardless of what happens this week, this month, on this issue, it will not make the issue itself go away,” he said.

But Rep. Robert Aderholt (R-Ala.) said he was encouraged by the strong support the bill received from fellow Republicans. He was lead author of an amendment that would effectively invalidate the executive actions taken by Obama in November and his policy instructing federal immigration officers to focus their efforts on deporting illegal immigrants with criminal backgrounds. The amendment passed with GOP support.

“It was a strong vote. I think it sends a message to the Senate as it goes forward. And we're optimistic about it,” he said.

In the wake of terrorist attacks in France last week, Republicans have faced criticism from Obama and congressional Democrats for delaying swift passage of new security funding. Some party leaders and operatives also worry that the aggressive nature of the bill will once again spoil GOP attempts to appeal to Hispanic and Asian voters in the 2016 president election. But GOP congressional leaders have said that the legislation is designed only to respond to Obama's "executive overreach."

"We do not take this action lightly, but there is simply no alternative," Speaker John A. Boehner (R-Ohio) said ahead of the vote as he recounted the 22 times he said Obama has raised doubts about his ability to change immigration policy through presidential powers. "Enough is enough," he added later.

The White House denounced the House vote, saying Republicans were putting homeland security funding, training and long-range planning at risk. Obama’s top domestic policy adviser, Cecilia Muñoz, reiterated Obama’s threatened veto.

The House GOP “is interested in debating immigration but only interested in debating it if they undo the most significant and constructive actions that have taken place in many years,” she said in a conference call with reporters. Republicans are doing nothing on immigration that would “move the country forward.”

Gil Kerlikowske, the commissioner of U.S. Customs and Border Protection, said Obama’s executive actions are aimed at allowing the department to focus resources on deporting illegal immigrants who have committed felonies or have terrorist ties, rather than those who are living in the country illegally but do not break other laws.

“Prioritization is critical for any law enforcement agency,” he said.

While 218 Republicans voted for the amendment ending DACA, the "no" votes came from newly-elected Reps. Bob Dold (R-Ill.) from the Chicago suburbs; Cresent Hardy (R-Nev.) from the Las Vegas suburbs; Ryan Costello (R-Pa.) and Tom MacArthur (R-N.J.) from the Philadelphia suburbs; Carlos Curbelo (R-Fla.), who represents a Miami-area district; Martha McSally (R-Ariz.), who won her election by fewer than 200 votes; and Rep. John Katko (R-N.Y.) from an Upstate New York district that has switched parties several times in recent years.

They were joined by senior Republicans in their state delegations, including Florida's Mario Diaz-Balart and Ileana Ros-Lehtinen; Adam Kinzinger of Illinois; New Jersey's Chris Smith and Frank LoBiondo; New York's Chris Gibson, Richard Hanna and Peter King; Pennsylvania's Patrick Meehan and Charlie Dent; and Nevada's Mark Amodei and Joe Heck. Other members, including Reps. Jeff Denham (R-Calif.), Devin Nunes (R-Calif.), David Valadao (R-Calif.), Fred Upton (R-Mich.) and Mike Coffman (R-Colo.), also voted no.

In the Senate, Republicans control 54 seats, but 60 votes will be needed to advance the bill, and no Democratic senator has expressed support for it. The impasse means Republican leaders will need to negotiate a watered-down bill that can earn Democrat support, pass the Senate and be sent back to the House before current homeland security funding expires on Feb. 27.

If Republicans fail to block Obama's immigration policies through legislation, House and Senate leaders may team up on a new federal lawsuit challenging him, House Judiciary Committee Chairman Bob Goodlatte (R-Va.) said Wednesday. Noting that several states are now challenging Obama's immigration actions in court, he said a similar suit might be brought by GOP lawmakers in the House and Senate.

"No decision has been made about that," he said, at a reporter breakfast hosted by the Christian Science Monitor, adding that it's likely to be the subject of talks at a two-day GOP policy retreat that begins Thursday at a conference center in Hershey, Pa.

"Congress has the right to write the laws and appropriate funds to programs under Article I of the Constitution, and if we are successful in using that legislation and make it clear that there is no legal authority for the president’s actions, then we don’t need to get to litigation," he added.

Sean Sullivan and David Nakamura contributed to this report.