President Barack Obama delivered a passionate discourse on America's racial history Friday and then broke into song during a eulogy for a state senator and pastor, slain along with eight other black churchgoers in the Charleston massacre.
Dubbed the "reverend president" by his South Carolina hosts, Obama took up the mantle of pastor-in-chief and led the congregation in singing "Amazing Grace" -- an emotive homage likely to be remembered as one of the defining moments in his presidency.
Clementa Pinckney, pastor at the historic Emanuel African Methodist Episcopal Church and also a state senator, was shot dead along with eight of his congregants in Charleston last week, an apparently racially motivated attack that shocked the nation.
"What a good man," Obama said, praising Pinckney, who he knew personally. "Sometimes I think that's the best thing to hope for when you're eulogized."
Much of Obama's address was focused not directly on Pinckney, but on social strains that his death has underscored: race, gun control and the country's Civil War.
America's first black president said the Confederate flag -- the Civil War standard of the white slave-owning south that was taken up by alleged gunman Dylann Roof -- was not just an emblem of heritage.
"The flag has always represented more than just ancestral pride," Obama said in charged and combative remarks. "For many, black and white, that flag was a reminder of systemic oppression and racist subjugation. We see that now."
Removing the flag from public buildings, he said, would not be an act of political correctness or an "insult to the valour of Confederate soldiers."
"It would simply be an acknowledgment that the cause for which they fought, the cause of slavery was wrong."
"It would be one step in an honest accounting of American history."
'Unique mayhem' of guns
Obama drew a line between the June 17 shooting at a Bible study class at the Emanuel AME Church and past brutal treatment of black Americans.
"It was an act that drew on a long history of bombs and arson and shots fired at churches -- not random but as a means of control, a way to terrorize and oppress," he said.
Roof, 21, has been charged with nine counts of murder and a related weapons charge. He is in custody in a South Carolina jail.
Obama said America had ignored the toll of gun violence for too long and again pleaded for action, as he has done several times since the killings.
"We've been blind to the unique mayhem that gun violence inflicts upon this nation," he said.
"The vast majority of Americans, the majority of gun owners, want to do something about this."
Obama referred to other mass shootings that have shocked America -- the Newtown school massacre in 2012, the killings in a Colorado theater earlier that same year.
"Whatever solutions we find will necessarily be incomplete. But it would be a betrayal of everything Reverend Pinckney stood for, I believe, if we allowed ourselves to slip into a comfortable silence again," he said.
Obama, having seen previous initiatives to control gun ownership fail in Congress, has expressed anger and declared that "at some point" America would have to act.
The city of Charleston has tried to come together after the killings.
Some mourners arrived in the early hours under a blistering summer sun, forming long lines at a city arena and anxious to secure seats for Friday's service.
"We need to come together," said 66-year-old Rose Marie Manigault, who made the short trip from Mount Pleasant to pick her spot just before dawn broke over the gathering throng.
Pinckney's widow Jennifer and his daughter Malana wrote messages of remembrance in the program.
"We believe that your life mattered. It mattered to us, and it will forever change the culture and mindset of the world," said his wife.
"I love you so much!" wrote Malana.