COLUMBIA, S.C. — With the state capitol behind him and a crowd of hundreds in front of him, Sen. Bernie Sanders celebrated Martin Luther King Jr. Day by telling a rare personal anecdote: He was in Washington, with the marchers, when the civil rights icon delivered his “I Have a Dream” speech.

“Let us never forget that the title of that march was ‘Jobs and Freedom,’ ” said Sanders, the Vermont independent. “I find it remarkable that 56 years after that march, many of the demands being made then are still being fought for.”

Sanders set out to reintroduce himself to black voters this week as he mulls another presidential bid, offering a message that emphasizes the role of racism in American culture. It marked a substantial revision from his 2016 presidential bid, when he downplayed racism and blamed economic inequities on a rigged system of government that affected all workers equally.

“Racial equality must be central to combating economic inequality,” Sanders said, in a speech that used the refrain “racism is alive” to walk through a litany of problems faced by minorities.

The changes from Sanders’s last campaign were hard to miss. In 2016, he said that “identity politics” distracted from what he considered real issues, like economic inequality and the decline of organized labor.

This week, on his first trip to an early-primary state since the midterm elections, Sanders called President Trump a “racist,” pushed for an end to private prisons, endorsed a constitutional amendment guaranteeing the right to vote and advocated for an end to the cash bail system. He spoke at two black churches, mingled with supporters at a barbecue joint and met with the state’s legislative black caucus, which had largely rejected him in 2016.

He also used the trip — two days including the Martin Luther King Jr. Day holiday — to tie King’s legacy to the movement that powered his run in 2016.

“We are here today to understand that he had a revolutionary spirit. Yes, he was a revolutionary,” he said, using a word that Sanders’s supporters use to describe the senator.

Sanders’s tour came after years of overtures to black voters, a constituency he’d struggled with in his race against Hillary Clinton, who with her husband, Bill, had spent decades building relationships with black leaders and voters.

“He saw room for growth and improvement on civil rights and justice issues,” said Shaun King, a civil rights activist who endorsed Sanders in 2016 and has been an informal adviser since then. “It just struck me as very sincere, and I’ve had real insincere conversations with people about that stuff, so I think I can tell the difference.”

Blacks made up 25 percent of voters who participated in the 2016 Democratic primaries and caucuses, according to exit polls. Sanders won, on average, 21 percent of the black vote across the primary and caucus states with exit polling. Clinton’s strength among black voters gave her victories that stopped Sanders’s momentum after his early strong showings in Iowa and New Hampshire. His continued unpopularity among nonwhite voters assured his defeat in a primary process that stretched to the late spring of 2016.

In South Carolina, the fourth state on the Democratic primary and caucus calendar, black voters made up 61 percent of the electorate in 2016, up from 55 percent eight years earlier. Sanders won just 14 percent of the black vote, then angered some black leaders by saying that Clinton had drubbed him in “the most conservative part of this great country.”

But this time Sanders has worked to forge more connections in the state and the broader black community, and polling has consistently shown him with high favorable numbers among black voters. Since 2016, he has endorsed strikes and union drives by nonwhite workers in Los Angeles and Mississippi, and he lent his support to new, young black mayors in Birmingham, Ala., and Jackson, Miss.

“People know him a lot better,” said Henry Griffin, a vice president with the South Carolina State Conference NAACP, who supported Clinton in 2016.

“There’s a much better feeling about him,” explained Kathy Jarvis, 67, of Columbia. She was among the few black voters who supported Sanders last time, but she said he didn’t visit enough black churches. “This is where the votes are,” she said.

But the political landscape for 2020 is not shaping up like the last one. Clinton is not running, and the list of contenders could include at least two African American colleagues of Sanders’s.

Sen. Kamala D. Harris (D-Calif.) officially joined the race Monday morning, adding a high-profile black woman to the roster of presidential candidates. Sen. Cory Booker (D-N.J.), who appeared with Sanders at Zion Baptist Church in Columbia on Monday, said he’s “close” to deciding whether he’ll also join the field.

Both candidates have faced criticism from Sanders supporters and the broader left — especially Harris, a former county prosecutor and state attorney general who had defended tough-on-crime policies now far out of fashion among Democrats.

But since the beginning of the South Carolina Democratic primary in 1988, every black candidate who has seriously competed for the state has won it. As Harris’s record was being picked apart in Washington, some in South Carolina asked whether the criticism was unfair.

“We all have records that we have to defend,” House Majority Whip James E. Clyburn (D-S.C.) said in a short interview near the state capitol. “I have no idea what all this stuff is, but the fact is, she was an attorney general, and the law dictates what she had to do. She should not be held responsible for the law.”

Sanders sounded torn when asked during a panel discussion Monday whether he’d enter the contest.

“There are some really good people who have announced, and they’re friends of mine,” Sanders said, listing Sens. Elizabeth Warren (D-Mass.) and Kirsten Gillibrand (D-N.Y.), along with Booker and Harris.

“My views are maybe a little bit different,” he added. “You need to take on the people who have power . . . the assessment I’ve got to make is, is there a willingness in the grass roots of this country to take those people on?”

Sanders still faces considerable skepticism here. “Bernie’s taking the temperature, and it is cold,” said Antjuan Seawright, a Democratic strategist who worked on Clinton’s campaign last time.

He predicted that it will be difficult for Sanders to stand out in a field that’s likely to include multiple black candidates, given that, as he put it, “Sanders has always struggled stylistically.”

Yet the senator has clearly made some connections. On Monday night, Sanders gave a brief version of his speech to a church service in Florence organized by the NAACP, then headed out the door.

“I was going to say some things I wanted him to hear,” said the Rev. Norman Gamble, the evening’s keynote speaker. Moments later, Gamble told the audience that “capitalism” amounted to “exploitation” for millions of people; it was a message that could have come from Sanders.