The celebration by Republican elites was instant, and so was the backlash on the far right.

South Carolina Gov. Nikki Haley, the youthful daughter of Indian immigrants, had delivered a sunny and inclusive Republican response to President Obama’s State of the Union address that stood as an unmistakable counter to her party’s two presidential front-runners.

But Haley’s moment and its aftermath revealed an uncomfortable reality for GOP leaders. Even as they praised their chosen representative for condemning the polarizing politics fueling the rise of Donald Trump and Ted Cruz, the currents of the 2016 race still churn against the establishment.

Conservative talk radio and social media lit up with contempt for her critique. “Trump should deport Nikki Haley,” commentator Ann Coulter tweeted. Rush Limbaugh accused Haley of taking part in a GOP conspiracy to “drive conservatives out of the party.”

And Trump, predictably, slammed her as soft on immigration and hypocritical. “Over the years, she’s asked me for a hell of a lot of money in campaign contributions,” he said on Fox News Channel.

What initially was hailed as a breakthrough for a party struggling to assume control of its image and message — Mitt Romney, the 2012 nominee, said Haley displayed “courage you can count on” — became a fleeting episode that called fresh attention to the establishment’s limited ability to do so.

With just 19 days until the kickoff Iowa caucuses, party leaders are tiptoeing around Trump and Cruz — nervous about agitating them and their supporters, fearful that their hard-line views on immigration and other topics could lead to general-election defeat, and uncertain about how to deny either the brash billionaire mogul or the combative senator from Texas the nomination.

[The mainstream media loved Haley’s speech. That doesn’t mean conservatives did.]

“There doesn’t seem to be a plan for how to deal with Trump. They’re afraid,” said William J. Bennett, a top official in the Ronald Reagan and George H.W. Bush administrations. “Instead of taking him on directly, they’re making vague, diffuse references.

“What’s worse,” he continued, “is that this leaves them in a position to be thumped by Trump. This is not the way he talks or campaigns, and he’ll hit them right back as fuzzy and weak.”

House Speaker Paul D. Ryan (R-Wis.) and Senate Majority Leader Mitch McConnell (R-Ky.) selected Haley to deliver the party’s nationally televised response. Haley embodies the kind of party Ryan in particular is trying to build: even-tempered, reform-minded, pro-business and open to minorities.

“She clearly is a terrific advocate for an inclusive, younger, solution-oriented Republican Party,” said former House speaker Newt Gingrich (R-Ga.).

Republican presidential front-runner Donald Trump responded to criticism from South Carolina Gov. Nikki Haley on Wednesday. (Peter Stevenson/The Washington Post)

Speaking Tuesday night from Columbia, S.C., Haley urged Americans to resist the temptation “to follow the siren call of the angriest voices” and to make everyone in the country feel welcome. The remarks were widely viewed as a clear reference to Trump’s immigration-related proposals, which include a massive wall on the U.S.-Mexico border and a temporary ban on Muslims entering the country.

Haley also said Democrats were not solely responsible for the failures in Washington. “There is more than enough blame to go around,” she said. “We, as Republicans, need to own that truth.”

Ryan and McConnell reviewed the text of Haley’s speech before her delivery, but there was no coordination to use the setting to attack Trump, their aides said. “Governor Haley did a great job with the speech. She had the pen and didn’t need much input from anyone,” said Ryan spokesman Brendan Buck.

Tim Pearson, Haley’s political adviser, said the governor told Ryan she would deliver the response only if he agreed to let her say whatever she wanted to say.

“There was nothing in the speech that she didn’t want in there, and there was nothing that she wanted in the speech that didn’t get in there,” Pearson said. “It was all hers.”

[Private memo lays out how the GOP would deal with Trump as its nominee]

Outside operatives said they suspected otherwise.

“Many conservatives feel that even though she’s a good governor, she probably got some of her talking points from the establishment,” said Kellyanne Conway, an adviser to a Cruz-allied super PAC. “It was an attempt to undercut Ted Cruz and Donald Trump.”

During Haley’s speech, a focus group of general-election voters assembled by Republican pollster Frank Luntz responded positively — more so, he said, than for any State of the Union response in a decade.

“She did exactly what the average voter would want from her,” Luntz said. “She was magnanimous and responsible. But neither attribute plays well in a right-wing Republican primary. . . . The danger for the Republicans is that they are caught between an uncompromisable base and an unforgiving general electorate.”

This tension was on display throughout the evening. As members of Congress assembled for the State of the Union, Trump was rallying his faithful inside a college gymnasium in Cedar Falls, Iowa. He warned of the dangers posed by illegal immigrants and foreign refugees. Putting on his glasses, he gave a dramatic reading of a song about a woman who invited a snake into her home, only to be bitten.

Publicly, party leaders are reluctant to fully reject Trump and Cruz’s brand of politics. Privately, however, they are in nearly universal agreement that Haley’s compassion represents the right approach, both politically and morally.

“You can’t begin to imagine how many moods were lifted as a result of listening to her remarks,” said Al Cardenas, a former chairman of the American Conservative Union and a longtime Jeb Bush ally. “People went, ‘Yeah, that’s who we are.’ It was uplifting, it was timely, and it was very well delivered.”

Haley’s speech — coupled with her leadership last year after the Charleston church massacre and her removal of the Confederate flag from the state capitol grounds — could put her atop the list of possible vice-presidential candidates.

Haley, 43, was first elected governor in 2010 as a tea party favorite and a figure outside of her state party’s establishment. National GOP leaders have since embraced her, but she began her career as someone who railed against the institutional party in both her state and elsewhere.

“When you ask people to describe what a Republican is, overwhelmingly they say things like ‘rich,’ ‘white,’ ‘old,’ ‘grouchy’ and ‘male,’ ” said GOP consultant Katie Packer Gage. “Nikki is very, very accomplished, she’s very articulate and makes a great case for conservatism. And she doesn’t look like what people expect a Republican to look like.”

Gingrich went so far to suggest that Haley would make a good running mate for Trump. He said that despite their obvious differences — “Haley is a very positive person; Trump is by nature a confronter” — the two have much in common.

“Trump is articulating what an enormous amount of Americans think and feel — and most of it Nikki Haley wouldn’t disagree on,” Gingrich said. “She’s for legal immigration; look at Trump’s wife. They both want to move power out of Washington. They both want a country where everybody gets ahead.”