President Barack Obama has delivered a eulogy for the pastor killed with eight other African Americans inside a church last week in Charleston, South Carolina.
Obama said, "we are here to today to remember a man of God who lived by faith."
He described the Reverend Clementa Pinckney of the Emanuel African Methodist Episcopal Church as a man of service who persevered.
"Blinded by hatred, the alleged killer could not see the grace surrounding Reverend Pinckney and that Bible Study group," Obama said, adding "as a nation, out of terrible tragedy, God has visited grace upon us. For he has allowed us to see where we’ve been blind."
Obama also spoke about the Confederate flag that had flown outside the South Carolina state capitol until this week, "for too long, we were blind to the pain that the Confederate flag stirred in too many of our citizens."
"By taking down that flag, we express God’s grace," he said.
But Obama said the tragedy should call Americans to introspection on thorny issues of racism and guns; they should ask themselves tough questions on those matters.
“Perhaps it causes us to examine what we’re doing to cause some of our children to hate, for too long, we’ve been blind to the unique mayhem that gun violence inflicts upon this nation,” he said.
The service at the College of Charleston TD Arena took place just blocks from the church where the massacre took place.
Obama addressed the mourners after several other speakers, and after those gathered joined in song with the hundreds strong Mother Emanuel choir for rousing gospel standards between speakers.
Police closed off much of the center of this historic port city, with crowds expected to far exceed the 5,400-seating capacity of the venue.
Metal detectors, bag searches and the visible presence of Secret Service agents throughout the arena at the College of Charleston added to the heightened sensibilities of the guests.
WATCH: Related video by Jerome Socolovsky
"I'm here to hear Obama speak hopefully on racism, forgiveness and justice," said Wannetta Mallette, of North Charleston. She said she was already impressed by Obama's comments after the killing of an unarmed black man by a white police officer in her city.
"I think everyone is here to share in the grief and sorrow," she said.
The first two funerals, for Ethel Lance and Sharonda Coleman-Singleton, were held Thursday amid tight security.
Ministers arrive for the funeral services for the Reverend Clementa Pinckney in Charleston, S.C., June 26, 2015.
On Thursday night, a wake was held inside the Emanuel AME church for Pinckney, who was 41 and the father of two children. Thousands of mourners come to pay their last respects, with a line snaking for three blocks.
Members of two predominantly black motorcycle clubs, Band of Bruthaz and Wheels of Soul, were also there in black leather jackets, one club member holding a bunch of roses.
Members of Wheels of Soul, a black motorcycle club, came to Charleston to pay their respects. (Jerome Socolovsky/VOA News)
A member who gave his name as Jody said he hoped the peaceful response to the racially motivated shooting would send a message to other parts of the country.
“Charleston has come together, better than we ever known,” he said. “Charleston is a tough place. We went through a lot but, hey, we’ll make it through this one.”
He called Obama’s appearance on Friday “a lovely thing.”
Watch related video of Obama singing at the funeral
The president knew Pinckney and visited the Emanuel AME church during his 2008 campaign. Obama's wife, Michelle, as well as Vice President Joe Biden and his wife, Jill, will also be in attendance at the funeral.
The wife of South Carolina State Sen. and Rev. Clementa Pinckney, Jennifer, sits with daughters Malana and Eliana (R) during his funeral, at the College of Charleston TD Arena, June 26, 2015.
Following the service for Pinckney, the president is expected to meet privately with the families of other victims.
South Carolina Gov. Nikki Haley, who plans to attend all of the funerals, was there with Charleston Mayor Joe Riley, U.S. Rep. Mark Sanford, the Rev. Jesse Jackson and the Rev. Al Sharpton.
Former Secretary of State Hillary Clinton, who is also a Democratic presidential nominee for 2016, will also be attending.
The shootings took place June 17 during a Bible study at the church.
Some material for this report came from AP.
WATCH: Related video by Jerome Socolovsky