Senator Bernie Sanders used a Democratic primary forum in South Carolina on Friday to try to reach out to black voters and make the argument that he is the candidate best suited to address the needs of a demographic that overwhelmingly favors Hillary Rodham Clinton, his chief rival for the nomination.

“I think that I have the economic and social justice agenda now that once we get the word out, will, in fact, resonate with the African-American community,” Mr. Sanders said in a forum in Rock Hill, S.C., where his primary opponents, Mrs. Clinton and Martin O’Malley, a former governor of Maryland, also answered questions.

Because the Democratic National Committee did not sanction the event as an official debate, the First in the South Presidential Candidates Forum, hosted by the South Carolina Democratic Party and Representative James E. Clyburn, the candidates could not be questioned onstage at the same time.

Instead, the moderator, MSNBC’s Rachel Maddow, questioned each of the candidates individually in reverse order of their ranking in national polls, starting with Mr. O’Malley and ending with Mrs. Clinton. At the end of the event, the three candidates appeared together and exchanged friendly handshakes.