Former Vice President Joe Biden Joe BidenMomentum growing among Republicans for Supreme Court vote before Election Day Trump expects to nominate woman to replace Ginsburg next week Video of Lindsey Graham arguing against nominating a Supreme Court justice in an election year goes viral MORE quickly tore into Sen. Bernie Sanders Bernie SandersNYT editorial board remembers Ginsburg: She 'will forever have two legacies' Two GOP governors urge Republicans to hold off on Supreme Court nominee Sanders knocks McConnell: He's going against Ginsburg's 'dying wishes' MORE (I-Vt.) at the Democratic presidential debate in Charleston, S.C., on Tuesday, accusing the senator of plotting a 2012 primary challenge against then-President Obama.

“He thought we should primary Barack Obama Barack Hussein ObamaMomentum growing among Republicans for Supreme Court vote before Election Day Warning signs flash for Lindsey Graham in South Carolina Majority of voters say Trump should not nominate a Supreme Court justice: poll MORE,” Biden said minutes after the debate began.

Biden’s accusation, as well as a subsequent attack over Sanders’s past opposition to gun control legislation, came just days before the South Carolina primary and appeared geared toward many of the black voters who will play an integral role in deciding the winner in the state.

ADVERTISEMENT

Among the attacks levied by Biden was that Sanders voted “five times against the Brady Bill,” a 1994 measure that mandated background checks for firearm purchases and implemented a five-day waiting period on such purchases.

Indeed, Sanders has had a mixed record on gun-related legislation. For instance, he once voted against a measure allowing lawsuits against firearm manufacturers.

Sanders, the nominal front-runner in the Democratic nominating contest, fired back against Biden on Tuesday, suggesting that Biden’s attack and those of other candidates were due to the senator's recent victories in the New Hampshire primary and Nevada caucuses.

“I’ve been hearing my name mentioned a little bit tonight,” Sanders said. “I wonder why.”

Biden this week released an ad in South Carolina accusing Sanders of not supporting Obama in 2012.

ADVERTISEMENT

Sanders denied the allegation that he planned to challenge Obama while speaking at a CNN town hall on Monday.

"I did not give any consideration to running for president of the United States until 2015," he said.

Biden is in need of a win in South Carolina, the fourth state to hold its nominating contest and the first in which black voters make up a majority of the Democratic electorate. The former vice president has so far struggled with worse-than-expected performances in the primary race and has seen his front-runner status fade in recent weeks, as Sanders has taken the lead.

After months of holding double-digit leads in South Carolina, recent polls show an increasingly close race in the state. One NBC News-Marist survey released this week showed Biden leading Sanders by only a single point.