As a White House national security official prepared to give damaging testimony in the House impeachment inquiry Tuesday, President Trump and some of his allies immediately began a push to attack the integrity and patriotism of the decorated Iraq War veteran.

Former congressman and Trump surrogate Sean P. Duffy said Army Lt. Col. Alexander Vind­man had “an affinity for Ukraine” over the United States because it was his birthplace. Trump’s personal attorney Rudolph W. Giuliani joined in with the suggestion on Twitter that Vindman was “advising two gov’s,” an apparent reference to dual loyalties.

And Trump himself attacked Vindman as a political opponent: “Supposedly, according to the Corrupt Media, the Ukraine call ‘concerned’ today’s Never Trumper witness,” the president tweeted Tuesday. “Was he on the same call that I was? Can’t be possible!”

But for many Republican lawmakers, the moves to discredit Vindman’s character were a bridge too far — suggesting that the escalating attacks on the witnesses testifying about Trump’s alleged misconduct may have a limit.

“We’re talking about decorated veterans who have served this nation, who have put their lives on the line,” said Rep. Liz Cheney (R-Wyo.). “It’s shameful to question their patriotism, their love of this nation, and we should not be involved in that process.”

The competing messages reflect internal tensions among many Republicans as they seek to balance defending Trump with upholding some of their long-standing principles.

While Trump has pushed for GOP lawmakers to “get tougher and fight,” he has embraced scorched-earth rhetoric that some in his party have struggled to defend. Over the past month, Trump has compared impeachment to a “lynching,” described his GOP critics as “human scum,” called for the unmasking of a federally protected whistleblower and accused administration officials testifying against him of being unpatriotic, or worse.

As his attacks have escalated, the Republican response has been disjointed, with loyalists embracing offensive terms such as “lynching” and others distancing themselves from the harsh language and tactics.

On Tuesday, Trump’s campaign to brand his opponents as part of a “Deep State” cabal of government officials working against him ran headlong into the biography of Vindman, who fled the Soviet Union with his family as a child and who received a Purple Heart after being injured by a roadside bomb in Iraq.

Vindman, a Ukraine expert on the National Security Council, found himself in the president’s crosshairs as he prepared to tell Congress that he was concerned that Trump had sought to pressure the Ukrainian government to investigate Democrats. While his testimony was the latest in a string of damaging revelations by Trump administration officials, the effort by some Republicans to discredit him based on his birthplace created another fault line in the GOP’s impeachment response.

Speaking on Fox News on Monday, former George W. Bush administration official John Yoo said he found it “astounding” that Vindman had reportedly been speaking with Ukrainian officials who sought guidance on how to deal with the Trump administration.

“And some people might call that espionage,” said Yoo, after host Laura Ingraham said she found the Iraq War veteran’s background, language skills and interactions with the Ukrainian government “interesting.”

By Tuesday, Yoo was walking back his comment after several elected Republicans said attacking Vindman’s loyalty to the United States was inappropriate. Yoo told the Washington Examiner on Tuesday that he was accusing the Ukrainian government of potential espionage, not Vindman.

Duffy, who said on CNN that he did not know if Vindman was putting American interests above Ukrainian interests, also backtracked later Tuesday.

“Lt. Col. Vindman is an American war hero,” he wrote on Twitter, adding that he was only trying to highlight that Vindman was “an unelected advisor.”

Those retreats came after several elected Republicans admonished some Trump defenders for their willingness to denigrate a veteran.

Sen. John Thune (R-S.D.) said it was a “mistake” to question Vindman’s patriotism.

In his opening statement, which was obtained by The Washington Post, Vindman described himself as a “patriot” and said he thought Trump’s push to get Ukrainian officials to launch investigations targeting Democrats was inappropriate.

His testimony added to the growing collection of evidence implicating Trump in an apparent quid pro quo linking military aid or a White House visit for Ukraine to political investigations. It also forced Republican lawmakers to decide whether they would embrace a dual-loyalty smear being pushed by some conservative pundits and right-wing figures seeking to undermine Vindman’s account.

While many opted against taking that approach against a decorated veteran, Republicans continue to struggle with defending Trump on the substance of the allegations he faces, said Brendan Buck, who served as counselor to former House speaker Paul D. Ryan (R-Wis.).

“The ultimate problem is the substance is completely indefensible,” he said. “Members can’t stomach arguing the merits so you get attacks on credibility and the process.”

Trump has already expressed his displeasure with Republicans’ process-focused approach, calling for a more robust defense of his dealings with Ukraine.

“So one thing I said, I’d rather go into the details of the case rather than process,” Trump told reporters Monday, relaying a conversation with GOP lawmakers.

Defending Trump on the allegations has become increasingly difficult as several members of Trump’s administration have effectively testified against him.

Vindman’s testimony echoed the opening statement delivered last week by William B. Taylor Jr., the acting U.S. ambassador to Ukraine. Taylor, a Vietnam War veteran and career diplomat, told lawmakers he was alarmed by the White House push for an improper quid pro quo shortly after the Trump administration tapped him to be the top liaison to the Ukrainian government in Kyiv.

Like Vindman, Taylor used his opening statement to stress his bipartisan background and his decades of public service. Few Republican lawmakers have attacked Taylor personally after his testimony, which directly implicated Trump in an improper quid pro quo.

Trump, however, has been more than willing to question whether his critics love the ­country.

“The Never Trumper Republicans, though on respirators with not many left, are in certain ways worse and more dangerous for our Country than the Do Nothing Democrats,” Trump said last week after Taylor’s testimony rocked Washington. “Watch out for them, they are human scum!”

As some Republicans distanced themselves from that description, White House press secretary Stephanie Grisham expanded its meaning in an interview with Fox News.

“The people who are against him and who have been against him and working against him since the day they took office are just that,” she said, indicating that the slur applies to all of the president’s opponents. “They deserve strong language like that.”

While Trump has not attacked Vindman’s heritage, many of his most ardent supporters have begun pointing to his Ukrainian background. The charge of dual loyalty — even that Vindman was acting as a “double agent” — quickly gained traction in right-wing corners of the Internet.

The conspiracy theory was advanced by Jack Posobiec, a far-right provocateur known for promoting the “Pizzagate” lie. In a tweet, he falsely claimed that Vindman was working with his “home country” to thwart Trump’s agenda. He cited the New York Times as his source, though the notion appeared nowhere in the newspaper’s reporting.

The falsehood gained more than 10,000 retweets Tuesday, and the same claim was also repeated word for word by other accounts. Others amplifying the smear against Vindman included Ryan Fournier, the co-chairman of Students for Trump.

Leon Panetta, who served as a defense secretary and CIA director in past Democratic administrations, said the campaign against Vindman amounts to “an attack on what America is all about as a nation of immigrants.”

“This combination of a commander in chief who demeans people who served this country, combined with other leaders criticizing those who served the country, are just contributing to an American decline,” he said.

Seung Min Kim and Isaac Stanley-Becker contributed to this report.