NORTH CHARLESTON, S.C. (Reuters) - Democratic presidential candidate Bernie Sanders brought his progressive populism to deeply Republican South Carolina, and made a pitch to connect with the black voters that provide most of the Democratic support in the early primary state.

It was the Vermont senator's first visit to the state since announcing his candidacy in late April, in a challenge to Democratic front-runner Hillary Clinton.

Sanders had canceled a planned appearance in Charleston in June in the wake of the massacre at the city's Emanuel African Methodist Episcopal Church that left nine dead.

In North Charleston, the last of five stops in the state, he invoked the names of Michael Brown, Eric Garner, Freddie Gray and Walter Scott, all unarmed black men who died in the hands of police officers in a little over a year.

"We are going to end institutional racism and we are going to transform and make changes in the criminal justice system that isn't working," he said to loud cheering from a crowd of about 3,100. "When a police officer breaks the law, that police officer must be held accountable. We need new rules on the use of force."

He also mentioned the Charleston slayings, which authorities have called racially motivated.

"I'm not just talking about somebody who walked into a Bible study class, prayed with the people in that group and then took out a gun and killed nine people. I'm talking about the hundreds of hate groups that exist in this country today whose only function is fomenting of hatred of African Americans, gays, immigrants, Jews."

Sanders is trying to beat Clinton by building grassroots support in the states that hold the first nominating contests ahead of the general election in November 2016.

A recent CNN poll showed Sanders is supported by 29 percent of Democratic and Democratic-leaning voters, a gain of 10 points since July, compared with 47 percent for Clinton.

Sanders' campaign staff met with the Charleston chapter of activist group Black Lives Matter on Friday night, said local activist Muhiyidin D'Baha who attended Saturday night's speech. "They've been really good in receiving critique. We're really hoping that we have impacted his message."

"Black Lives Matter" has become a rallying cry for demonstrators protesting grand jury decisions not to charge white police officers in the killings of unarmed black men inFerguson, Missouri, and New York City.

Sanders drew crowds of more than 2,000 in Greenville, a conservative enclave in the northwest corner of the state, and Columbia, the state capital, where he met with black pastors, said campaign spokesman Michael Briggs.

A mostly white crowd of supporters began lining up hours ahead of Sanders' speech

"He's for getting the money out of politics," said Matt Thomas, 24, a college student.

Sanders has no Super-PAC and has raised $1.5 million and counts 400,000 individual donors, Briggs said. Clinton, in contrast, has raised more than $45 million.

"Other candidates just want to benefit the super wealthy and corporations," said Greg Zills, who drove from Jacksonville, Florida.

"He's my favorite politician, and he hasn't been to Florida."

(Reporting by Harriet McLeod; Editing by Andrea Ricci)