Rep. John Katko bucked House leadership Wednesday on a controversial immigration vote.

The newly sworn-in Republican joined Reps. Chris Gibson, Richard Hanna and Peter King in opposing an effort to block one of President Obama’s executive actions on immigration.

The amendment, part of a multi-pronged effort to derail the President’s immigration policies, would end Obama’s 2012 executive action that has allowed undocumented immigrants brought here as children, known as Dreamers, to remain in the country without fear of deportation.

A total of 26 House Republicans opposed the measure, perhaps worried about the message the bill would send to swing voters in states with large immigrant populations.

“I disagree with the President’s unilateral approach on this issue,” Katko said in a statement released shortly after the vote. “But I also disagree with members of my party who wish to retroactively punish those who have already come forward under the protection granted by the President. Congress needs to work in a bipartisan way with the President to secure our borders and reform our broken immigration system.”

That sentiment was echoed by Hanna, who said the amendment would uproot the lives of 600,000 young people who have already been granted permission to stay.

Hanna, Gibson and King, however, did support a similar effort back in August to end the Dreamers program.

Reps. Chris Collins, Tom Reed, Elise Stefanik and Lee Zeldin supported Wednesday’s vote.

All of the state’s Republicans voted to scrap Obama’s executive action, announced in November, that allows millions of other undocumented immigrants to avoid deportation. They also supported the Department of Homeland Security spending bill to which the amendments were attached.

The bill passed the House by a vote 236-191. It is likely moderate Republicans and Democrats in the Senate will vote to strip the immigration amendments out of the bill and then send it back to the House.