WASHINGTON – A vote on immigration policy Wednesday gave two new Republican Congressmen their first test in weighing their moderate districts against the more conservative instincts of some of their new colleagues.

Freshmen U.S. Reps. Ryan Costello, of Chester County, and Tom MacArthur, of South Jersey, broke with the majority of Republicans on one controversial amendment on immigration, joining most other Republicans from the Philadelphia region in dissenting from their party on one provision.

At issue was a GOP bill that would fund the Department of Homeland Security while also undoing President Obama's recent executive actions on immigration, which Republicans say exceeded his authority.

Costello, MacArthur and other local Republicans supported the overall bill. But among the GOP proposals was one that would roll back a 2012 program that has stopped the deportation of so-called "dreamers" – people brought to the U.S. as children who have gone to school here or served in the armed forces. In targeting a sympathetic population, the amendment became politically charged, even within the GOP.

Costello and MacArthur voted against slashing the protections for those brought here as children, as did other Philadelphia-area Republicans Charlie Dent and Pat Meehan (of Pennsylvania) and Frank LoBiondo and Chris Smith (of New Jersey). They were six of 26 Republican votes against the amendment, which passed. U.S. Rep. Mike Fitzpatrick (R., Pa.), of Bucks County usually votes with the rest of the local bloc, but this time went a different direction and supported the amendment to roll back the program.

Costello initially voted for the amendment, but ended up as a 'no.' In just his second week in Congress, he said he had hit the wrong button at first.

"There are a lot of immigration reform measures that need to take place," Costello said. "Focusing on kids who are here through no choosing of their own is the wrong way to go about addressing it up front."

He said it "sends the wrong message" and that rolling back the program now, after many have come forward to be part of it, risks penalizing those who have come forward to obtain legal status.

MacArthur had a similar take.

"I didn't think this was the place to start," MacArthur said. "It's going after young people who have been brought here. I want to see the Republican party show compassion, and at the same time restore the rule of law. I think it's important that we have a tough but fair process where people that have been brought here can earn their citizenship."

For Costello and MacArthur, their vote early in their terms reflected a tension often faced by veteran  Republicans from the Philadelphia region. Representing moderate districts, local GOP lawmakers have frequently broken with their party's most conservative wing, which has often driven House debate.

MacArthur said he would support immigration reform that strengthens border security, sends criminals back to their home countries, and allows a pathway to citizenship that includes payment of back taxes, learning English, and waiting behind people who have come to the U.S. legally.

As of July, the deferred action program has given legal protections to around 587,000 people since it was enacted, according to the Migration Policy Institute. In Pennsylvania 27,000 people are eligible for the program either now or in the future (when they reach age 15). In New Jersey that number is 86,000, among the highest in the nation, according to the institute.

Fitzpatrick said he voted for rolling back the popular program because he thought the president had gone too far in enacting the Deferred Action for Childhood Arrival program in 2012 and in taking additional steps last year to protect roughly five million undocumented immigrants from deportation.

"The principle question was whether or not the president has the authority to be changing immigration law unilaterally without consulting with Congress," Fitzpatrick said. "I think his executive orders have been unconstitutional."

The plan has little chance of becoming law -- Obama has vowed to veto it -- but gave Republicans a chance to show their anger at the president's unilateral action.

While they were against the amendment to roll back the program for "dreamers," MacArthur and Costello agreed that Obama's other executive action had gone too far. They joined nearly all Republicans, including all of those from the Philadelphia area, in supporting the overall bill, even though the final package included the deferred action roll back they initially opposed.

"We need to make it clear that Congress makes laws," MacArthur said.

All Philadelphia-area Democrats voted against the full bill and the provision on the deferred action program.

U.S. Sen. Robert Menendez (D., N.J.), one of the leading advocates for immigration reform, blasted the House bill, which Senate Democrats have pledged to block and which Obama has vowed to veto.

House Republicans, Menendez said, "are playing Russian roulette with our nation's security by tacking overreaching, anti-immigrant poison pill amendments to must-pass funding legislation for the Department of Homeland Security."

You can follow Tamari on Twitter or email him at jtamari@phillynews.com.