Before nearly 6,000 mourners and a worldwide television audience, Obama, who met Pinckney during his first presidential campaign, placed the shootings in the context of America's long history of violence against African-Americans. He also reiterated his plea to restrict the availability of firearms and called for the removal of the Confederate battle flag from the grounds of the Statehouse in Columbia.
Obama thrilled the mostly African-American audience by preaching with revivalist cadences, and by closing his 40-minute address by singing, solo, the opening refrain of "Amazing Grace." The crowd came to its feet and joined in, leading the Rev. Norvel Goff, a presiding elder in the AME church, to later "thank the Reverend President."
By treating every child as important regardless of skin color and by opening up opportunities for all Americans, Obama said, "We express God's grace.''
As the nation's first African-American president, Obama has often struggled to find the proper balance of timing, words and place to speak about America's racial divisions. Intent on being seen as a president for all and confronted with what he saw as the more urgent economic crisis, he approached racially charged disputes cautiously in his first term.
But politically unfettered after his re-election in 2012, and angered by the racially motivated killings in Charleston and the deaths of black men at the hands of white police officers, the president on Friday dispensed with his usual reticence, rediscovered the soaring rhetoric that inspired his supporters in 2008, and spoke with unusual - and occasionally acerbic - directness.
"For too long," Obama said, "we've been blind to the way past injustices continue to shape the present. Perhaps we see that now. Perhaps this tragedy causes us to ask some tough questions about how we can permit so many of our children to languish in poverty, or attend dilapidated schools, or grow up without prospects for a job or for a career."
As he spoke, Obama was backed by a stage filled with African Methodist Episcopal preachers, cloaked in the purple vestments of their church, and a black-robed gospel choir. Obama joined with others paying tribute in stressing that the 21-year-old white man charged with the killings had failed to achieve his stated goal of inciting racial conflagration. Rather, he said, the killings had the opposite effect, generating an unprecedented show of racial unity and inspiring a nationwide revolt against Confederate symbols.
"It was an act that drew on a long history of bombs and arson and shots fired at churches," Obama said, "not random, but as a means of control, a way to terrorize and oppress, an act that he imagined would incite fear and recrimination, violence and suspicion, an act that he presumed would deepen divisions that trace back to our nation's original sin."
He paused for effect. "Oh, but God works in mysterious ways," Obama said. "God has different ideas. He didn't know he was being used by God." The crowd erupted in applause as women waved their hands toward the ceiling.
Obama commended South Carolina's Republican governor, Nikki R. Haley, for her call this week to bring down the Confederate flag in Columbia, saying it would be "a meaningful balm for so many unhealed wounds."
"Removing the flag from this state's Capitol would not be an act of political correctness," Obama said. "It would not be an insult to the valor of Confederate soldiers. It would simply be an acknowledgment that the cause for which they fought - the cause of slavery - estimated 5,000 people were turned away due to a lack of space. Members of Emanuel, where Pinckney had been pastor for five years, were given prime seating on the arena floor.
The dignitaries in attendance included the first lady, Michelle Obama; Vice President Joe Biden and his wife, Dr. Jill Biden; House Speaker John Boehner, who traveled on Air Force One for the first time during the Obama presidency; Haley, the governor; Hillary Rodham Clinton, the former Secretary of State and current Democratic presidential candidate; Sen. Tim Scott of South Carolina; Mayor Joseph P. Riley Jr. of Charleston; dozens of members of Congress and the South Carolina Legislature; and civil rights leaders like the Rev. Jesse L. Jackson, the Rev. Al Sharpton, and Martin Luther King III.
"Sister Jennifer and the girls," Goff said, addressing Pinckney's wife and two daughters, "I want you to know that the world has come to you." After the service, the Obamas and the Bidens met with the families of those killed as well as the survivors of the massacre.
Obama, who acknowledged he had not known Pinckney well, said friends of the pastor's had remarked "that when Clementa Pinckney entered a room, it was like the future arrived; that even from a young age folks knew he was special, anointed."
While the service centered on paeans to Pinckney, some speakers took the opportunity to address the nature of his death and its remarkable political aftermath.
"Someone should have told the young man," said the Right Rev. John Richard Bryant, senior bishop of the AME church, referring to the accused killer, Dylann Roof. "He wanted to start a race war but he came to the wrong place." The audience rose in a thunderous ovation, punctuated by an organist's exclamations. A sign on an easel to the left of the stage declared: "Wrong church! Wrong people! Wrong day!"
State Sen. Gerald Malloy, one of Pinckney's closest friends, spoke of Pinckney's support for often unsuccessful legislative efforts to expand Medicaid coverage, regulate discriminatory lending practices and block voter identification requirements.
"He answered life's most pervasive question, and that is what are you doing for others," Malloy said. The pastor's funeral was the third in a series of nine that is scheduled to conclude Tuesday. Three others are planned for Saturday, one each on Sunday, Monday and Tuesday.
Pinckney's burial in Marion, South Carolina, home to his mother's family, concluded a three-day tour that took his coffin first to Columbia, where he lay in state beneath the Capitol rotunda, then to his simple childhood church in Ridgeland, and, on Thursday night, to Emanuel itself. Thousands of dark-suited mourners waited in line for hours to walk through the church, peer into Pinckney's open coffin, and pay respects to his devastated family.
Ushers handed out a glossy program filled with photographs of Pinckney, from childhood through his pastorate. In one he was dressed in blue hospital scrubs holding one of his newborn daughters. Others showed him as a young boy, dressed in his uniform of a vested suit and necktie. The program included letters to Pinckney from his family, their first public comments since the shootings.
"You promised me you would never leave me!" Jennifer Benjamin Pinckney wrote to her husband. "You promised me we would be together for years to come! You promised me we would watch our children grow, get married, and have children of their own. You promised me that we would grow old together and spend our latter years without the demands of the Church or the State. I feel robbed, cheated, and cut short."
Pinckney's eldest daughter, Eliana, 11, observed that "when someone loves you they care even if they are not there." Her sister, Malana, 6, wrote: "Dear Daddy: I know you were shot at the Church and you went to Heaven. I love you so much! I know you love me and I know that you know that I love you too." She signed it, "Your baby girl and grasshopper."