In December 2007, a poll conducted by the Pew Research Center showed Hillary Clinton ahead of Barack Obama by 14 points in South Carolina, 45 percent to 31 percent. According to the survey, 44 percent of the black voters in the state were backing Obama, while Clinton was at 43 percent.

The poll did not turn out to be predictive. Less than two months later, with momentum from a victory in Iowa and a near win in New Hampshire, Obama carried 55 percent of the vote in the state, compared to Clinton’s 27 percent. Exit polls showed African-Americans were the majority of the electorate, and 78 percent backed Obama, a full 34 points ahead of the December Pew poll, compared to just 19 percent for Clinton.

As the Democratic candidates of 2016 prepare to debate Sunday night in the NBC News-YouTube debate in Charleston, South Carolina, that history is relevant again.

Vermont Sen. Bernie Sanders is in a tight race with Clinton in Iowa and ahead in New Hampshire, and he could get a win in one of those first two contests.

But if Sanders wants to become a true threat to Clinton for the Democratic nomination, he must gain more black support. And South Carolina’s primary on February 27, after Iowa, New Hampshire and Nevada, will be the first big test of Sanders’ appeal to blacks.

Obama was nominated because of his strong backing from white liberals, younger Democrats, independents and blacks, while older and more moderate Democrats favored Clinton. Polls of the 2016 race show Sanders has three parts of Obama’s coalition, but not African-Americans.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: How to Watch the NBC News-YouTube Democratic Debate

A recent Fox News poll showed Clinton with 71 percent of the non-white vote nationally (it did not break out by race, but the majority of non-white Democratic voters are black), compared to 20 percent for Sanders. A December poll by YouGov of South Carolina Democrats found that Sanders and Clinton were effectively tied among whites, but Clinton was winning about 80 percent of the black vote, compared to about 20 percent for Sanders.

It seems unlikely Sanders will ever get 80 percent of African-American votes, as Obama did repeatedly during the 2008 primaries. But Sanders needs to make sure Clinton does not get 80 percent either.

Blacks are the majority of the vote in many Democratic primaries in the South and a huge segment of the electorate in others. They were perhaps the decisive factor in Obama defeating Clinton, and Sanders likely can’t win the primary if he takes huge losses among blacks.

And if his backers are overwhelmingly white, that will also undercut Sanders’ message of leading a political revolution that unifies people of different ideologies, economic classes and even races.

Related: What to Expect From Tonight's NBC News-YouTube Debate

That’s why Sanders has invested heavily in ground organizers in South Carolina and other states, met and then adopted ideas of Black Lives Matter activists and made a number of campaign stops at historically black colleges. His campaign in particular views younger black voters as a key potential bloc of support, since they may have less of a connection with Bill and Hillary Clinton.

Clinton, looking to maintain this advantage among blacks, has campaigned in a number of states in the South, courted African-American leaders like Al Sharpton and Jesse Jackson and announced on the eve of this debate that former Attorney General Eric Holder was endorsing her.

At the elite level, African-Americans are overwhelming for Clinton. More than a dozen members of the Congressional Black Caucus have endorsed the former secretary of state, compared to one black member of the House backing Sanders. Clinton has a huge swath of black mayors and state representatives behind her.

Obama has not endorsed Clinton, but the president has referred to his former rival as “one of the finest secretary of states we’ve had” and not made such effusive comments about Sanders. Holder is both the first-ever black attorney general and a close friend of the president’s.

Related: What's Your Political DNA? Take Our Quiz

Whether that elite support for Clinton translates to black voters is unclear. In 2008, Clinton and Obama each got about half of the major endorsements from key black figures, but Obama easily won the black vote.

In this race, Sanders is already showing how little the party establishment may matter to voters. Clinton has overwhelming support from Democratic elected officials, but Sanders is very close to her in most polls.