WASHINGTON (Reuters) - Freshman Democrats determined to walk a centrist path in the U.S. House of Representatives are testing party harmony between moderates and liberals, just as work on major issues including gun control and healthcare policy is getting underway.

U.S. Rep. Joe Cunningham (D-SC) poses for a picture before his interview for Reuters on Capitol Hill, February 26, 2019. REUTERS/Yuri Gripas

Democrats took control of the House from President Donald Trump’s fellow Republicans in January thanks in part to party moderates who won seats formerly held by Republicans in November’s midterm elections.

But these centrists already have upset some Democratic elders including House Speaker Nancy Pelosi and the party’s liberal wing by voting on occasion with the Republicans during their first couple of months in office. Republicans are in the minority in the House, but control the Senate.

Tensions flared this week after House Republicans managed to successfully amend a gun control bill with votes from 26 Democrats. Many of the Democrats who broke with the party line on Wednesday represent swing districts that had voted for Trump in 2016.

“How did Nancy Pelosi let this happen?” Justice Democrats, a liberal political action committee that helped elect new Democratic star Representative Alexandria Ocasio-Cortez of New York in November, asked on Twitter after the vote.

The episode highlights the political tightrope being walked by several dozen freshman who helped to clinch the House majority for Democrats in November by expanding into Republican territory. There currently are 235 Democrats, 197 Republicans and three vacancies in the 435-seat House.

The centrists have not gotten as much attention as Ocasio-Cortez during their first months in office, and their differing positions from the party’s liberals on policies such as government-run healthcare have at times put them at odds.

They also already have Republicans on their backs for the next election in 2020. Many of the 55 seats Republicans plan to target next year are held by freshman Democratic lawmakers who captured a previously Republican-held seat last year or prevailed in districts Trump won in 2016.

Representative Joe Cunningham, 36, did both when he won a South Carolina district in November that had not elected a Democrat to the House since before he was born. Cunningham defeated Republican rival Katie Arrington by less than 2 percentage points in a district Trump won by 13 percentage points in 2016.

Slideshow ( 6 images )

On Wednesday, Cunningham was among the Democrats who supported the Republican amendment calling for Immigration and Customs Enforcement (ICE), an agency criticized by liberals like Ocasio-Cortez, to be notified when an illegal immigrant in caught trying to buy a gun.

Cunningham, a gun owner, said the next day he saw the amendment as minor. He added that it should not detract from the fact that the House had passed a gun control measure for the first time in two decades, calling for universal background checks on gun purchases.

In an interview on Tuesday, Cunningham was unapologetic for sometimes siding with Republicans. He has done it around a dozen times since January, mostly on procedural votes.

“I will be an independent check and not toe the party line whenever I disagree,” Cunningham told Reuters. “I’m not going to let the national party or the national message drive my message at home.”

Representative Jeff Van Drew of New Jersey, another Democratic freshman, said, “I just do what I think is right,” after straying from his party’s line on a previous Democratic proposal banning funding for Trump’s U.S.-Mexico border wall. Van Drew also supported the Republican gun amendment.

‘JUST VOTE NO’

The House Democratic leadership was divided this week on members breaking with the party line. Pelosi told reporters on Thursday she did not approve, even on procedural votes.

“Just vote no, because the fact is, a vote yes is to give leverage to the other side,” Pelosi said.

Other Democratic leaders took a more relaxed view.

“It’s OK to vote your district,” said Representative James Clyburn, a member of the House Democratic leadership who, like Cunningham, represents a South Carolina district.

“We have a very diverse caucus,” Clyburn added. “I wish people would not compare us to the Republicans, where everybody looks alike. We’ve got varied backgrounds and experiences that we have to take into account.”

Ocasio-Cortez’s communications director, Corbin Trent, said the congresswoman believes Democrats who have broken with the party on such votes “are putting themselves on a list for Republicans, to divide the party.”

At a closed-door party meeting on Thursday, Ocasio-Cortez, who describes herself as a “democratic socialist,” said Democrats who voted for the Republican gun amendment had put her in a difficult spot because the measure endangered some in her community, Trent said.

Despite the ongoing debate, the party has said it will work hard to defend Democrats in swing districts.

Representative Cheri Bustos, who chairs the committee that works to elect Democrats to the House, has announced a list of 44 lawmakers including Cunningham in the party’s “frontline” program that helps the most vulnerable Democrats with fundraising and campaign guidance. The list includes 41 first-term House members.

“We want to make sure that our members come back,” Bustos, a fourth-term congresswoman who represents an Illinois district won by Trump in 2016, said in an interview. “We want them to be successful, and they’ve got to do what they’ve got to do to be successful.”