Charleston, South Carolina (CNN) President Barack Obama delivered a touching eulogy, a rousing political speech and a thoughtful meditation on race in America when he traveled to Charleston, South Carolina on Friday to speak at the funeral of the Rev. Clementa Pinckney, who was gunned down last week by a racist terrorist during Bible study.

But the President's speech will be remembered for a moment at the end when he launched into a solo of "Amazing Grace," that at first stunned the mourners and then brought them to their feet as they joined him in song.

Mourners pay their respects to Pinckney as his body lies in the State House on June 24.

Mourners pay their respects to Pinckney as his body lies in the State House on June 24.

Pinckney's casket is carried to the South Carolina State House in Columbia, South Carolina, on Wednesday, June 24.

Pinckney's casket is carried to the South Carolina State House in Columbia, South Carolina, on Wednesday, June 24.

Church member Thomas Rose leaves a wake for Pinckney that was held on Thursday, June 25.

Church member Thomas Rose leaves a wake for Pinckney that was held on Thursday, June 25.

Members of the clergy wait to enter the funeral service.

Members of the clergy wait to enter the funeral service.

People watch as the hearse carrying Pinckney passes by June 26 in Charleston.

People watch as the hearse carrying Pinckney passes by June 26 in Charleston.

As the sun rises on June 26, Doris Simmons stands across the street from the Charleston church where the shooting took place earlier this month.

As the sun rises on June 26, Doris Simmons stands across the street from the Charleston church where the shooting took place earlier this month.

Members of Congress get off Air Force One in Charleston as they accompanied Obama to the service.

Members of Congress get off Air Force One in Charleston as they accompanied Obama to the service.

People wait for the funeral outside the TD Arena.

People wait for the funeral outside the TD Arena.

South Carolina Gov. Nikki Haley hugs Charleston Mayor Joseph Riley as they arrive for the funeral.

South Carolina Gov. Nikki Haley hugs Charleston Mayor Joseph Riley as they arrive for the funeral.

Members of Congress stand as they are introduced at the funeral service, which was held at the TD Arena in Charleston.

Members of Congress stand as they are introduced at the funeral service, which was held at the TD Arena in Charleston.

Pinckney's wife, Jennifer, attends the service with her daughters Eliana, left, and Malana.

Pinckney's wife, Jennifer, attends the service with her daughters Eliana, left, and Malana.

President Barack Obama delivers the eulogy for South Carolina state Sen. Clementa Pinckney on Friday, June 26. Pinckney was a pastor at the Charleston, South Carolina, church where he and eight other people were fatally shot on June 17. Pinckney was 41 years old. "We are here today to remember a man of God who lived by faith," Obama said. "A man who believed in things not seen. A man who believed there were better days ahead, off in the distance. A man of service who persevered knowing full well he would not receive all those things he was promised, because he believed his efforts would provide a better life for those who followed."

"As a nation, out of this terrible tragedy, God has visited grace upon us for he has allowed us to see where we've been blind," Obama said. "He's given us the chance, where we've been lost, to find our best selves."

The President's remarks at times felt like a sermon, with organ chords backing him during some of the most impassioned passages. The mostly African-American crowd was, at the end of the eulogy, on its feet, clapping and cheering Obama as he named each victim of the church shooting and declaring each "had grace."

The President, first lady Michelle Obama, Vice President Joe Biden, a bipartisan host of high-level members of Congress and Hillary Clinton all attended the memorial service at TD Arena in downtown Charleston. Last Wednesday, a 21-year-old man opened fire at a Bible study inside Charleston's Emanuel African Methodist Episcopal Church, killing nine.

The shooter declared he was there to "kill black people," and an online manifesto attributed to him contained white supremacist screeds.

Obama, in his eulogy, said the killer likely assumed he "would deepen divisions that trace back to our nation's original sin."

"But God works in mysterious ways," Obama said. "God had different ideas. He didn't know he was being used by God."

"The alleged killer could have never anticipated the way the families of the fallen would respond when they saw him in court in the midst of unspeakable grief, with words of forgiveness," Obama said.

JUST WATCHED Obama to deliver eulogy for slain Charleston pastor Replay More Videos ... MUST WATCH Obama to deliver eulogy for slain Charleston pastor 03:06

The country, he argued, has responded to the church shooting "with a thoughtful introspection and self-examination that we so rarely see in public life."

Friday's funeral service for Pinckney wasn't the first time Obama delivered a high-profile eulogy, and with a year and a half remaining in office, it may not be the last.

But on Friday, Obama's speech moved beyond just grief for the victims -- the President stepped directly into a national conversation about race in which he plays a central role.

"Removing the flag from this state's capital would not be an act of political correctness," he said. "It would not an insult to the valor of Confederate soldiers. It would simply be acknowledgment that the cause for which they fought, the cause of slavery, was wrong."

Photos: Remembering Sen. Clementa Pinckney President Barack Obama delivers the eulogy for South Carolina state Sen. Clementa Pinckney on Friday, June 26. Pinckney was a pastor at the Charleston, South Carolina, church where he and eight other people were fatally shot on June 17. Pinckney was 41 years old. "We are here today to remember a man of God who lived by faith," Obama said. "A man who believed in things not seen. A man who believed there were better days ahead, off in the distance. A man of service who persevered knowing full well he would not receive all those things he was promised, because he believed his efforts would provide a better life for those who followed." Hide Caption 1 of 22 Photos: Remembering Sen. Clementa Pinckney Pinckney's wife, Jennifer, attends the service with her daughters Eliana, left, and Malana. Hide Caption 2 of 22 Photos: Remembering Sen. Clementa Pinckney The Pinckney family walks together before Obama's eulogy. Hide Caption 3 of 22 Photos: Remembering Sen. Clementa Pinckney Members of Congress stand as they are introduced at the funeral service, which was held at the TD Arena in Charleston. Hide Caption 4 of 22 Photos: Remembering Sen. Clementa Pinckney South Carolina Gov. Nikki Haley hugs Charleston Mayor Joseph Riley as they arrive for the funeral. Hide Caption 5 of 22 Photos: Remembering Sen. Clementa Pinckney Mourners pay their respects at the funeral service. Hide Caption 6 of 22 Photos: Remembering Sen. Clementa Pinckney Mourners pray during the service. Hide Caption 7 of 22 Photos: Remembering Sen. Clementa Pinckney A mourner bows his head in prayer. Hide Caption 8 of 22 Photos: Remembering Sen. Clementa Pinckney A mourner raises her hands in prayer. Hide Caption 9 of 22 Photos: Remembering Sen. Clementa Pinckney People wait for the funeral outside the TD Arena. Hide Caption 10 of 22 Photos: Remembering Sen. Clementa Pinckney Members of Congress get off Air Force One in Charleston as they accompanied Obama to the service. Hide Caption 11 of 22 Photos: Remembering Sen. Clementa Pinckney As the sun rises on June 26, Doris Simmons stands across the street from the Charleston church where the shooting took place earlier this month. Hide Caption 12 of 22 Photos: Remembering Sen. Clementa Pinckney People embrace while waiting to enter Pinckney's funeral service. Hide Caption 13 of 22 Photos: Remembering Sen. Clementa Pinckney People wait in line to enter the TD Arena. Hide Caption 14 of 22 Photos: Remembering Sen. Clementa Pinckney People watch as the hearse carrying Pinckney passes by June 26 in Charleston. Hide Caption 15 of 22 Photos: Remembering Sen. Clementa Pinckney Members of the clergy wait to enter the funeral service. Hide Caption 16 of 22 Photos: Remembering Sen. Clementa Pinckney Mourners pray before the service. Hide Caption 17 of 22 Photos: Remembering Sen. Clementa Pinckney Mourners sing gospel hymns inside the arena. Hide Caption 18 of 22 Photos: Remembering Sen. Clementa Pinckney Mourners embrace next to Pinckney's casket. Hide Caption 19 of 22 Photos: Remembering Sen. Clementa Pinckney Church member Thomas Rose leaves a wake for Pinckney that was held on Thursday, June 25. Hide Caption 20 of 22 Photos: Remembering Sen. Clementa Pinckney Pinckney's casket is carried to the South Carolina State House in Columbia, South Carolina, on Wednesday, June 24. Hide Caption 21 of 22 Photos: Remembering Sen. Clementa Pinckney Mourners pay their respects to Pinckney as his body lies in the State House on June 24. Hide Caption 22 of 22

Unlike past times Obama has confronted an act of violence, he knew the highest profile victim of the Charleston shooting personally. Obama met Pinckney as an early supporter of his 2008 presidential bid.

That personal connection differentiated Friday's eulogy from the funerals Obama keynoted after previous shootings. So, too, did the renewed questions on race spurred by the shooter's apparent motivations.

"None of us can or should expect a transformation in race relations overnight. Every time something like this happens, somebody says, 'We have to have a conversation about race,'" Obama said. "We talk a lot about race. There's no shortcut. We don't need more talk."

Prior to the eulogy, Obama himself used some of his bluntest language to date on race during an interview with comedian Marc Maron on Friday , saying that just because the N-word is no longer used frequently in public, "that's not the measure of whether racism still exists or not."

JUST WATCHED How Obama responds to shooting attacks Replay More Videos ... MUST WATCH How Obama responds to shooting attacks 02:37

The moment was a distant cry from the earlier days of Obama's presidency, when he studiously avoided discussing race or the implications of his election to office.

At Friday's funeral, Obama called for greater attention to less apparent forms of racism.

"Maybe we now realize the way a racial bias can infect us even when we don't realize it 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," he said.