CHARLESTON, South Carolina — Hillary Clinton and Bernie Sanders went toe-to-toe for South Carolina Democrats' love Saturday night, and it was clear that Clinton came out on top in a state she's counting on as a firewall.

The former secretary of state received a rousing standing ovation and strong cheers throughout her speech from the black-majority crowd at the First in the South dinner. She praised President Barack Obama and his legacy before nodding to the importance she sees the state playing in her primary strategy as a barricade to stop Sanders' surging campaign.

"South Carolina, you don't need me to tell you how important you are in this election," she said. "You are one of our first lines of defense. You have the power to make sure we choose the nominee who will protect everything we've achieved and stop the Republicans from dragging us backwards."

Clinton spent much of the speech embracing Obama's legacy, calling it a "great compliment" that Republicans often mention her name alongside Obamas, and slamming the Republicans who just two days earlier took the stage in town to rip him to shreds in their debate.

"What I really find so appalling is the insulting, mean-spirited derogatory language that is used starting first and foremost against our president, immigrants, refugees and now they've thrown in New Yorkers," she said, calling out Ted Cruz and Chris Christie for "coded racial language" because they called Obama a "child" during the debate.

Clinton also touted her close relationships with many members of the Congressional Black Caucus, which cohosted the First in the South dinner, by extolling retiring Rep. Charlie Rangel (D-N.Y.) and thanking former Attorney General Eric Holder for his recent endorsement. Many of the CBC members are backing her and will speak at black churches across the state Sunday morning ahead of Sunday night's Democratic debate in Charleston, the final one before voting begins in less than three weeks.

Sanders, on the other hand, got a cool reception overall — and the one table in the huge room that went nuts for him showed the current limits of his reach in the state.

One rabid table in the back for @BernieSanders cheering as he enters. Notably all white in a majority-black room. pic.twitter.com/LnYBGVjmts — Cameron Joseph (@cam_joseph) January 17, 2016

Sanders indicated he knows he needs to improve his standing with black voters, spending a heavy amount of his speech talking up his longtime civil rights activism and using Martin Luther King's words to back up his policies. He got big cheers for calling out the "unspeakable tragedy" of the modern criminal justice system and talking up his support of Obamacare — but when he said the country still had "a long way to go" on health care and called for Medicare-for-all, he was met with silence.

And when he went to wrap up his half-hour speech, a few women in the back of the room sighed with relief and rolled their eyes.

.@BernieSanders after 30min: "Let me just conclude." Women in back of the room: "please, please." — Cameron Joseph (@cam_joseph) January 17, 2016

Clinton's hold on early-voting Iowa looks shaky, according to recent polls, and Sanders has a lead in New Hampshire, both of them driven by Sanders' support with white liberal voters and college students, and Clinton allies are fretting that losses in the first two states could lead to a long, drawn out primary.

But Clinton is banking hard on a win in more minority-heavy states like South Carolina to help right her campaign if things get off on the wrong foot — and if Saturday night's reception was any indication, her firewall of minority voters is likely to hold.