The first black president came to Charleston on Friday to speak to Americans about the worst crime motivated by racial hatred they have witnessed in recent memory.
He did not waste the opportunity.
Barack Obama delivered a powerful eulogy for a slain local preacher that had a mainly black audience clapping, calling out their affirmation and, in the end, joining him in song as he led the hall in the heart-tugging hymn Amazing Grace.
At times, he seemed as much preacher as president as he delivered what was perhaps his most Christian speech and the one in which he drew most deeply on the tradition of the churches that are the pillar of many black communities.
Since he was elected in 2008 and became the first black man to sit in the Oval Office, Mr. Obama has usually been cautious in his pronouncements about race, speaking out only after incidents like the fatal shooting of black teenager Trayvon Martin or the violence after the police shooting of a black man in Ferguson, Mo.
But the attack on a Charleston church last week was on another scale. The emotions it has provoked and the issues it has raised clearly called for a deeper, stronger response.
The result was an oration in which a president drawing toward the end of his second and final term put caution aside and jumped into the discussion of race that he himself is such a part of. He spoke to console but also to challenge, calling on Americans not to squander the moment of grief and of anguished questioning that has followed the Charleston killings.
Grace was the theme as Mr. Obama paid tribute to Clementa Pinckney, the preacher and state senator who was slain along with eight others in an attack on a historic black church.
Mr. Obama knew him personally. Rev. Pinckney was 41 and the father of two children when a gunman entered the church and then, after sitting with the Bible group for an hour, opened fire with a handgun and fled. The man charged with the murders, Dylann Roof, posted racist material online before the attack.
Instead of erupting in rage or rioting after the attacks, Charleston came together. Blacks and whites mourned side by side at the church and linked hands on a local bridge to show that they would not be divided.
Mr. Obama said that the attacker hoped he could widen divisions that "trace back to our nation's original sin." But "God works in mysterious ways. God has different ideas."
The gunman was so "blinded by hate," said the President, that he could not imagine that the victims' families would stand in court to say they forgave him or that the community would come together in generosity of spirit but also in calm introspection about what the meaning of such a crime could be and how American society has to change.
In a speech that was suffused with the rhythms of the church, Mr. Obama said "we are all sinners" and so don't deserve God's grace, "but God gives it to us anyway and we choose how to receive it. It's our decision how to honour it."
The best way to do that, he said, is not just to have yet another "conversation" about race but to work on the country's problems, from poverty to failing schools to the "unique mayhem" of gun violence to the many thousands of men marooned in the vast U.S. prison system.
This was Mr. Obama's first opportunity to speak at length about the shocking church killings that have Americans talking once again about racism, racial division and the sources of hate. Mr. Obama is reported to have been working on his speech all week.
When it came to delivering it, he was direct. Mr. Obama said the country had been blind to hurt caused by the waving of the Confederate flag – a symbol, he said, not just of ancestral pride but of "racial subjugation." He said that the cause for which Confederates fought – "the cause of slavery – was wrong."
He praised South Carolina Governor Nikki Haley for moving to take down the rebel flag that flies on the grounds of the State House.
"But I don't think God wants us to stop there. For too long, we've been blind to the way past injustices continue to shape the present."
He called on Americans to open their eyes to injustice and division. "Maybe we now realize the way racial bias can infect us even when we don't realize it," he said, "so that we're guarding against not just racial slurs, but we're also guarding against the subtle impulse to call Johnny back for a job interview but not Jamal."
More important, he called them to react to the tragedy the way Charleston has: with an open heart.
"That's what I've felt this week – an open heart. That, more than any particular policy or analysis, is what's called upon right now."
He asked Americans to summon up the "reservoir of goodness" that sustains the nation. "If we can find that grace, anything is possible. If we can tap that grace, everything can change."
It was here that he paused for a moment, appearing overcome by emotion. A hush fell over the auditorium. Then he began slowly to sing. As they recognized the hymn, the purple-and-black-clad ministers standing on the dais behind him jumped to their feet. The crowd joined in, applauding as he sang. "Amazing grace … how sweet the sound … that saved a wretch like me; I once was lost, but now I'm found; was blind but now I see."
Each of last week's victims found that grace, he said. "Through the example of their lives, they've now passed it on to us. May we find ourselves worthy of that precious and extraordinary gift, as long as our lives endure. May grace now lead them home," he concluded. "May God continue to shed His grace on the United States of America."
The crowd rose to its feet as one. It has been an extraordinary time in the life of the United States – on the same day , the Supreme Court ruled gay marriage legal across the country – and it was an unforgettable moment in the presidency of Barack Obama.