The conservative movement finally had a presidential candidate it believed could go the distance: Ted Cruz, an adept communicator with deep pockets and a sophisticated national organization.

But here in South Carolina, a state tailor-made for a hard-liner who appeals to evangelicals, the Texas senator’s ideologically pure candidacy is struggling to overtake the celebrity-infused populism of Donald Trump — and contend with the religious overtures of Sen. Marco Rubio (Fla.), who on Wednesday picked up the coveted endorsement of Gov. Nikki Haley.

A stumble by Cruz in Saturday’s primary would raise doubts ahead of the delegate-rich March contests about the electoral power and influence of the hard right’s galaxy of grass-roots groups, media organs and faith leaders that have coalesced around him.

It would also signal a fundamental shift in the Republican base: away from traditional right-wing alliances and litmus tests toward a new conservatism shaped by style, emotion and nationalism.

“I think everybody is an underdog compared to Trump right now,” said Gary Bauer, a prominent social conservative leader who has endorsed Cruz. “But I don’t think there’s any risk here for social conservatives. Any possible nominee, including Trump, will have to make their peace with the various segments of the Republican coalition.”

At a news conference in Mt. Pleasant, S.C., Sen. Ted Cruz (R-Tex.) said on Feb. 17 that Donald Trump sent his campaign a "cease and desist" letter to stop a campaign ad Trump calls misleading. (Reuters)

The stakes for all the candidates — but especially Cruz — were evident on the campaign trail Wednesday. Trump’s campaign lawyer sent a cease-and-desist letter to Cruz, protesting a negative television ad arguing that Trump was an inconsistent conservative. Cruz then made a lawyerly presentation to reporters, gesticulating as one would toward a judge as he dared Trump to sue him and threatened to depose the billionaire mogul himself.

At the same time, Cruz sought to fend off a possible surge by Rubio, whose campaign is showing signs of new life after a difficult week in New Hampshire. Haley, a popular second-term governor and rising national star, endorsed Rubio, dealing a blow to former Florida governor Jeb Bush. Cruz responded with a blistering new ad, called “Sales Pitch,” that spliced together footage of Rubio and President Obama using similar language to promote the 2013 immigration reform bill.

In the past two presidential campaign cycles, conservative-movement leaders watched as their chosen candidates — former Arkansas governor Mike Huckabee in 2008 and former Pennsylvania senator Rick Santorum in 2012 — stormed out of Iowa caucus wins only to fizzle because they lacked the money and organization to sustain a national campaign.

This time seemed different. Cruz pitched himself as a conservative who could actually win. His campaign and super PACs easily raised tens of millions of dollars. He has deployed organizers on the ground throughout the country and has vowed to carry his campaign to the Republican National Convention in July.

“It’s durability,” said pollster Kellyanne Conway, who runs one of the pro-Cruz super PACs. “Cruz’s team is playing long ball for the long haul.”

Tony Perkins, president of the Family Research Council and a Cruz supporter, said, “There’s never been this much coalescing around a conservative candidate who actually has the ability to go the distance.”

Republican presidential candidate Donald Trump arrives to speak at a campaign rally Tuesday in North Augusta, S.C. (Jabin Botsford/The Washington Post)

Cruz has ably wooed the professional class of the conservative movement. He has shared chips and salsa — and grievances — with back-bench House members in a Capitol Hill Tex-Mex restaurant. He has joined Heritage Foundation scholars for winding policy lunches over Chick-fil-A sandwiches. He has rallied church leaders at Pizza Ranches and in prayer sessions across Iowa.

Cruz cemented his anti-establishment credibility by leading a crusade against President Obama’s health-care law in 2013 that resulted in a partial shutdown of the federal government. His network of allies has grown ever since and includes such vocal backers on conservative talk radio as Mark Levin and Rush Limbaugh.

“He’s on the right side of every single issue, and he’s led on every single issue,” said Brent Bozell, a national conservative activist who supports Cruz. “He’s not a conservative during campaign season who panders to Washington in the interim. . . . He’s shown he will ‘walk the talk,’ so to speak.”

But the power of these bonds is being tested.

In the Iowa caucuses, which Cruz won, he carried only 34 percent of evangelical or born-again Christians, compared with 22 percent for Trump and 21 percent for Rubio, according to network entrance polls.

In New Hampshire, the spread was worse for Cruz. Trump won 27 percent of evangelicals there, compared with 23 percent for Cruz and 13 percent for Rubio, according to network exit polls.

In both states, Trump beat Cruz by double-digit margins among non-evangelical voters.

In the latest CNN poll of likely GOP voters in South Carolina, Trump holds the support of 42 percent of the state’s white evangelical voters. Cruz is in second at 23 percent.

“It doesn’t matter if these people are for him,” former House speaker Newt Gingrich, who won the South Carolina primary in 2012, said regarding Cruz’s endorsers. “There is a country out there that doesn’t care at all. There is Washington, and there is the country — and that includes what’s happening on parts of the right.”

In South Carolina, nearly two-thirds of Republican primary voters in 2002 identified as born-again Christians, a slightly higher share than in Iowa. Evangelicals make up even bigger majorities of the GOP electorate in a string of Southern states holding primaries in early March: Alabama, Georgia, Mississippi, Oklahoma and Tennessee.

As in South Carolina, the heavily religious electorates in these states should give Cruz an advantage. But Trump’s dominance in the polls is challenging the senator’s ability to unite social conservatives. And Rubio and retired neurosurgeon Ben Carson are bolstering their own ties to the Christian right and chipping into Cruz’s natural base.

Trump campaign manager Corey Lewandowski said evangelicals are weighing a range of issues as opposed to simply rallying to the candidate with the most traditionally faith-infused message.

“The misconception about evangelicals is that they’re single-issue voters,” Lewandowski said. “They’re pro-life as well as pro-Second Amendment, pro-national security — the list goes on.”

Lewandowski pointed to Gingrich’s South Carolina victory, which was fueled by media buzz and fiery debate performances, as a model for Trump. “Newt wouldn’t have won the last time if it was all about just one type of voter,” he said.

Cruz’s associates define the senator’s supporters as a specific kind of conservative — those whose politics are rooted in constitutional principles.

“They’re engaged in a different way,” said New Jersey Republican activist Steve Lonegan, a Cruz supporter. “They understand the Constitution and the meaning of the Constitution. Trump and Carson supporters are much more emotion-based, and they react to simple sound bites.”

This past week in South Carolina, the feud between Cruz and Trump has taken a dark turn. With television advertisements and in his stump speeches, Cruz is trying to expose Trump as an untrustworthy champion of Christian values. He is using Trump’s past liberal positions to discredit him on abortion rights, same-sex marriage and other issues. The death of Supreme Court Justice Antonin Scalia has given Cruz another weapon as the senator argues that Trump would appoint insufficiently conservative jurists.

“The conservative movement is alive and well, and when they have the right information, they make wise decisions,” Cruz spokesman Rick Tyler said. “We’re trying to get them the right information that Donald Trump is not a conservative.”

Trump has bristled at Cruz’s critique, repeatedly calling him a liar and insisting he would be the stronger guardian of Christian values.

“You’re willing to lie about anything, but then you’re holding up a Bible?” Trump said of Cruz on Monday. “To me, it’s no good.”

Perkins said many evangelicals in South Carolina have been “flirting” with Trump but predicted that some would shift their allegiance to Cruz by Saturday.

“People are fed up with politics as usual, and the things that Donald Trump is saying resonate with them,” Perkins said. “However, what we saw in Iowa is that as people got closer to pulling the lever, they started looking a little closer at Donald Trump, and they realized that while they agree with him at the surface, there’s not that common bond.”

Leaders on the right remain confident that Cruz eventually can secure the nomination because he represents the best chance for the long-simmering conservative movement to fundamentally reshape the Republican Party in their image.

The question in their minds is whether Trump upends their carefully calibrated strategy.

“If you study history, the establishment is always knocked over by outsiders, who then become the new establishment. So on and so forth,” said Craig Shirley, a conservative public affairs consultant and Ronald Reagan biographer. “I do think 2016 is the tipping point.”

Scott Clement and Breanne Deppisch in Washington contributed to this report.