House Speaker John Boehner of Ohio walks back to his office on Capitol, Wednesday, Jan. 14, 2015.

In a move that drew an avalanche of reactions – praise from those who want a hard line on immigration, and condemnation from those who want more leniency – the GOP-led House approved legislation Wednesday to overturn President Barack Obama's key immigration policies and expose hundreds of thousands of younger immigrants to expulsion from the U.S.

Both Republicans and Democrats stressed that the funding bill, which would provide $39.7 billion to finance the Homeland Security Department through the rest of the budget year, was sorely needed to pay for counterterrorism, cybersecurity and other priorities at a moment when the Paris terror attacks have underscored dire threats.

One of the most controversial parts of the bill was an amendment that overturns one of President Barack Obama's key immigration policies and exposes hundreds of thousands of younger immigrants to expulsion from the U.S.

The bill passed easily in the chamber, with a 236-191 count.

Democrats accused Republicans of putting Homeland Security funding at risk by attaching veto-bait amendments on immigration, and some Republicans voiced the same concern. But House GOP leaders and most of their rank and file accused Obama in turn of reckless and unconstitutional actions on immigration that had to be answered.

"This executive overreach is an affront to the rule of law and to the Constitution itself," said House Speaker John Boehner of Ohio. "The people made clear that they wanted more accountability from this president, and by our votes here today we will heed their will and we will keep our oath to protect and defend the Constitution."

But Rep. Linda Sanchez, D-Calif., who chairs the Congressional Hispanic Caucus, said the Republicans were simply pandering to the far right.

"Shame on Republicans for attacking the Latino community," Sanchez said. "Republicans are consciously targeting millions of families who work hard, contribute to our communities and are just trying to give their children a chance at the American dream."

Given the growing importance of Latino voters, Wednesday's immigration votes could end up raising questions in the 2016 presidential election for the eventual GOP nominee. Potential candidates weren't touching the issue Wednesday. Requests for comments from former Florida Gov. Jeb Bush and former GOP nominee Mitt Romney went unanswered. At an event in Manchester, New Hampshire, Sen. Rand Paul of Kentucky refused to say if he would back his House colleagues' efforts.

One of the immigration amendments, approved 237-190, would undo executive actions that Obama announced in November to provide temporary deportation relief and work permits to some 4 million immigrants in the country illegally, mostly people who have children who are citizens or legal permanent residents. The amendment also would cancel earlier directives to immigration agents aimed at giving them discretion in focusing deportations on criminals.

A second amendment would delete Obama's 2012 policy that's granted work permits and stays of deportation to more than 600,000 immigrants who arrived in the U.S. illegally as children under age 16. That measure passed narrowly, 218-209, as 26 of the more moderate Republicans, some representing large Hispanic populations, joined Democrats in opposition.

The underlying bill passed on a mostly party line vote, with 10 Republicans voting "no" and two Democrats voting "yes."

But even with Republicans in control of the Senate, the bill faces tough sledding there. Republicans are six votes shy of the 60-vote majority needed to advance most legislation, and some GOP senators have argued that the Homeland Security bill shouldn't be the vehicle for a contentious debate on immigration.

Within the House GOP, too, there's frustration from some centrist lawmakers that two weeks into a new session of Congress, with a bigger party majority in the House, the most conservative lawmakers are still calling the shots, successfully pushing leaders for a vote to undo the 2012 policy dealing with younger immigrants known as "Dreamers."

"If we were just specifically dealing with the November overreach of the president, you'd have Democrats who'd be voting with us on that piece of it but we've gone well beyond that," said Rep. Jeff Denham, R-Calif. "We're passing a bill for political reasons, a bill that has no ability to pass the Senate."

Before leaving town for a two-day retreat in Hershey, Pennsylvania, Republicans also steered the House to approval of legislation to ease the landmark Dodd-Frank law, which aimed to rein in banks and Wall Street. The new legislation would give U.S. banks two extra years to ensure that their holdings of certain complex and risky securities don't put them out of compliance with a new banking rule. The Dodd-Frank changes, approved 271-154, also face an Obama veto threat.

While some Republicans avoided questions about the impact that the House vote on immigration amendments might have on the party's support by Latino voters in the 2016 election, Democrats were eager to weigh in.

Rep. Luis Gutierrez of Illinois warned Republicans they were igniting "the mobilization of an immigrant community throughout this nation that will be the death knell to the future of your party."

Wednesday's votes were set in motion late last year, after Obama infuriated Republicans by announcing executive moves on immigration not long after the GOP swept the midterm elections. Republicans passed full-year spending bills for most of the government but kept the Homeland Security Department on a short leash in order to revisit the issue when they would be in full control of Congress.

Yet given Obama's veto pen and Senate rules granting significant rights to the minority party, it's not clear that the GOP has much more leverage now than it did before. House and Senate Republican leaders have ruled out a government shutdown or any disruption to Homeland Security funding, so it appears likely that once the House bill is rejected by the Senate or vetoed by the president, the House will have to accept a version with less contentious language on immigration.

Current Homeland Security funding expires at the end of February, so House leaders have given themselves more than a month to find a solution. It's expected to be a topic of debate at the Hershey retreat.