People cheer with signs while waiting for Republican front-runner Donald Trump to arrive and speak at a campaign event Friday at the Myrtle Beach Sports Center in Myrtle Beach, S.C. (Jabin Botsford/The Washington Post)

The strength of anti-establishment fervor in the 2016 president campaign faces a twin test Saturday, with Donald Trump favored to win the Republican primary in the crucial state of South Carolina and Sen. Bernie Sanders battling Hillary Clinton for supremacy in the Democratic caucuses in Nevada.

Establishment Republicans have yet to fully coalesce around an alternative to Trump, though Sen. Marco Rubio of Florida, who stumbled in New Hampshire, hopes to rebound in Saturday’s balloting in South Carolina and cement himself in that role.

Clinton still enjoys strong support from the Democratic establishment, and her goal in Nevada is to blunt the momentum ­Sanders acquired from a victory in New Hampshire and then move on next week to South Carolina, where she enjoys broad support from African Americans.

A big Trump victory in the ­Palmetto State would stamp him clearly as the Republican front-runner, while a Sanders win in Nevada would raise more questions about Clinton’s appeal and add to the pressure on her to score a big victory in South Carolina.

All polls in South Carolina show Trump leading, though they differ over the size of his margin ahead of the next two candidates, Sen. Ted Cruz of Texas and Rubio. In Nevada, where polls are scarcer, Sanders and Clinton appear to be in a dead heat. The Vermont senator has appealed to younger Hispanics to support his candidacy in an effort to counter claims that he cannot attract minority votes.

Once considered a firewall for Hillary Clinton, Nevada has sharply turned into a tight and unpredictable contest for the former secretary of state as senator Bernie Sanders steadily gains support from critical voting blocs. (Alice Li/The Washington Post)

South Carolina’s Republican primary has a history of identifying the eventual nominee and often embracing the establishment’s choice of candidates. That pattern was broken four years ago when former House speaker Newt Gingrich handily defeated Mitt Romney. Trump threatens to do the same with a victory Saturday, which would further unsettle party regulars.

This weekend marks one of the few times when the Democratic and Republican calendars diverge. Republicans will hold caucuses in Nevada on Tuesday, and Democrats will have their primary in South Carolina on Feb. 27.

As the leading outsiders in the presidential race, Trump and Sanders continue to underscore the frustrations with politics as usual on both the left and­ right. Trump has tapped anti-immigration sentiment in particular and has drawn energy from working-class white voters. ­Sanders has energized younger voters as part of a grass-roots constituency that has given his candidacy surprising strength.

“There is a shift in the establishment and thinking of Republicans in South Carolina from mainstream, center-right Republicans to angry, hard-right Republicans,” said Katon Dawson, a former South Carolina Republican Party chairman who is not aligned with any candidate. “It’s a monumental shift against the pillars of our society: our government and our elected officials.”

That reality has put establishment candidates on the defensive in South Carolina, and none more so than former Florida governor Jeb Bush. Once the nominal front-runner for the GOP nomination, Bush could find his candidacy in serious jeopardy if he finishes poorly Saturday, as some polls suggest. The other establishment candidate, Ohio Gov. John Kasich, is hoping for a finish just strong enough to justify his focus on the March 8 Michigan primary as his best hope for a victory.

The tone of the South Carolina campaign has been overwhelmingly negative, and not only because of the millions of dollars in attack ads that flooded television stations in the final week. The candidates themselves have carried on an acrid dialogue in which the words “liar” and “lying” have been injected into campaign rhetoric at a volume rarely seen even in a state known for brutal intra­party contests.

Trump just won South Carolina. These charts show how huge that is.

In the last hours before the primary, Trump sought to brush off two recent controversies — one involving former president George W. Bush, whom Trump accused of lying about the existence of weapons of mass destruction in the run-up to the Iraq War in 2003, and the other with Pope Francis, who branded the New York billionaire as un-Christian for his views on immigration.

During a town hall meeting hosted by CNN on Thursday night, Trump softened his tone toward the pontiff and equivocated when pressed by a voter about whether he truly believed that Bush had lied before launching the invasion.

But Trump opened up a new line of attack Friday, calling on supporters to boycott Apple, which has refused requests from the federal government to help unlock an iPhone that was carried by one of the San Bernardino, Calif., terrorists.

Rubio spent Friday flying around the state, accompanied by a trio of leading South Carolina Republicans who have endorsed him: Gov. Nikki Haley, Sen. Tim Scott and Rep. Trey Gowdy. He pressed his argument that he alone among the candidates can unify the party.

But Rubio stressed that would not be enough to win a general election. “We can’t just unite,” he said. “We also have to grow.” In an effort to amplify the message that Rubio represents the future of a more diverse party, Haley described the tableau of a Cuban American senator, African American senator, Indian American governor and white member of Congress as “what the new conservative movement looks like, because it looks like a Benetton commercial.”

Cruz, meanwhile, appeared at a boisterous midday rally in Charleston, where he was interviewed by Fox News anchor Sean Hannity and joined by three conservative endorsers of his own: Rep. Mark Sanford, a former governor here who had not previously declared his support; Phil Robertson of “Duck Dynasty” fame; and David Limbaugh, brother of radio talk show host Rush Limbaugh.

Cruz told the crowd that the death of Supreme Court Justice Antonin Scalia leaves the high court — and with it many conservative principles — “hanging in the balance.”

He said that before they cast votes they should ask, “Who do we know beyond a shadow of a doubt will nominate and fight to confirm principled constitutionalists who will protect the Bill of Rights?”

Meanwhile, Bush brought in family reinforcements for a final-hours appeal to South Carolinians, campaigning alongside his mother, Barbara Bush. Sixteen years ago, South Carolina resurrected the campaign of George W. Bush after a loss in New Hampshire, and brother Jeb Bush hopes voters will give him a better-than-expected result Saturday.

Trump is favored to win here, but critics say that a disappointing finish could suggest weakness ahead of a round of Southern primaries on March 1. The impact of his recent feud with the pope and his attacks on George W. Bush will be measured against trend lines of late-deciding voters.

Trump faces persistent doubts about whether he has enough supporters to withstand a one-on-one contest in which mainstream conservatives are consolidated behind another candidate.

Katie Packer, who runs an anti-Trump super PAC and was deputy campaign manager for Romney’s 2012 campaign, said she believes South Carolina has the potential to reframe the race as a three-person contest between Trump, Cruz and Rubio.

“There’s still some iterations to be had,” she said. “Everybody wants to rush for this race to be over. . . . We have to be patient and let the voters decide.”

That is a view held by many in the party who fear the impact in November on Republican candidates in other races if Trump is the nominee.

For Clinton, Nevada was supposed to be where months of painstaking grass-roots organizing, plus goodwill in minority communities, would put a stop to Sanders’s momentum after the contests in Iowa and New Hampshire, far less diverse states.

Instead, in an effort to help stanch the bleeding of minority votes, especially from Latinos, Clinton’s surrogates have turned sharply to Sanders’s record on immigration issues, which they said has been checkered by votes in favor of anti-immigration bills and a vote against comprehensive immigration reform in 2007.

Clinton’s campaign has been playing down the importance of the Nevada vote in calls and other discussions with donors and key political supporters. The caucus format plays to Sanders’s grass-roots strengths, and the likely electorate is far less diverse than the state population as a whole, Clinton aides have told donors since her 22-point defeat in New Hampshire.

To emphasize her focus on South Carolina, Clinton received a boost Friday when the influential Rep. James E. Clyburn (D-S.C.) offered his support. “I believe that the future of the Democratic Party and the United States of America will be best served with the experience and know-how of Hillary Clinton as our 45th president,” Clyburn said.

At a late-morning stop in Elko, Nev., Sanders urged a crowd of 575 people packed into a high school gym to participate in Saturday’s caucuses.

“I hope we have a huge — no, yuuuugge — turnout,” Sanders said, playfully stretching out the word in an acknowledgment of how his Brooklyn accent is parodied on “Saturday Night Live” and elsewhere now that he is a national figure.

Sanders’s advisers argue that his message is resonating here in no small part because Nevada was hit hard during the financial crisis and is still feeling the hangover.

“No state more than Nevada understands the impact of Wall Street’s greed and illegal behavior,” Sanders told reporters Thursday en route from Washington to Las Vegas.

Phillip reported from Las Vegas and DelReal from Greenville, S.C. Anne Gearan in Washington; Jenna Johnson in North Charleston, S.C.; Sean Sullivan and Ed O’Keefe in Greenville; John Wagner in Elko, Nev.; Robert Costa in Charleston; and Philip Rucker in Columbia, S.C., contributed to this report.