President Barack Obama delivered the eulogy for the Reverend Clementa Pinckney in Charleston's TD Arena in a funeral that was attended by thousands.

Pinckney was one of nine churchgoers that were shot and killed by alleged shooter Dylann Roof at the historically black Emanuel African Methodist Episcopal Church in Charleston, South Carolina.

"We are here today to remember a man of God who lived by faith, a man who believed in things not seen, a man who believed there were better days ahead off in the distance," Obama said. "He believed his efforts would deliver a better life for those who followed."

The nearly 40-minute eulogy included a rendition of Amazing Grace led by the president and was sung by a crowd of 5,500 people.

According to ABC News, the president also spoke about race relations in the US and the increase in gun violence around the nation. "Maybe we now realise the way racial bias can infect us even when we don't realise it," he said. "For too long, we've been blind to the unique mayhem that gun violence inflicts on this nation."

He continued: "It would be a betrayal of everything Reverend Pinckney stood for if we allow ourselves to slip into a comfortable silence again...Once the eulogies have been delivered, once the TV cameras move on, to go back to business as usual. That's what we so often do."

The Wall Street Journal noted that Obama said it was time to remove the Confederate flag from around the US. The president said removing the now controversial flag would "not be an insult to the valour of Confederate soldiers", but would acknowledge that "the cause for which they fought, the cause of slavery, was wrong".

Obama also took time to honour the eight other victims killed during the Bible study shooting last week. "To lose him at 41, slain in his sanctuary, with eight wonderful members of his flock, each at different stages in life but bound together by a common commitment to God," the president said. "People so full of life and so full of kindness. People who ran the race and persevered. People of great faith."

ABC News reported the president referenced the 21-year-old alleged gunman, who he said was "blinded by hatred".

"He didn't know he was being used by God," Obama said of Roof. He added that the shooter did not realise "how the United States of America would respond not only at revulsion at his evil act but with big-hearted generosity and more importantly with the thoughtful introspection and examination that we so rarely see in public life".