CHARLESTON, S.C. (AP) -- President Barack Obama sang a hymn of hope and spoke with the fervor of a preacher as he eulogized a pastor and eight parishioners gunned down at a historic black church in an apparent hate crime -- and he minced no words in calling for an end to racial injustice and gun violence in the United States.
In his eulogy for the Rev. Clementa Pinckney, Obama suddenly began singing "Amazing Grace," quickly joined by ministers and some of the thousands who packed into the Emanuel African Methodist Episcopal Church in the city Charleston in South Carolina.
The nation's first black president called for gun control and efforts to eliminate poverty and job discrimination, and said the Confederate battle flag -- long a symbol of Southern U.S. pride -- must be removed from places of honor.
"For many -- black and white -- that flag was a reminder of systemic oppression and racial subjugation. We see that now," he said.
The president came to eulogize the Rev. Clementa Pinckney, a state senator and pastor of Emanuel, a church founded by the leader of a failed slave revolt and burned to the ground by angry whites in 1822. After the American Civil War, the church led efforts to expand equal rights in the South, hosting civil rights leader Martin Luther King Jr. during campaigns in South Carolina.
The church will be the site of two more funerals for three other victims on Saturday.
"We do not know whether the killer of Rev. Pinckney and eight others knew all of this history," the president said. "But he surely sensed the meaning of his violent act. It was an act that drew on a long history of bombs and arsons and shots fired at churches; not random, but as a means of control, a way to terrorize and oppress."
"An act that he imagined would incite fear, and incrimination, violence and suspicion. An act he presumed would deepen divisions that trace back to our nation's original sin," Obama continued, his voice rising in the cadence of the preachers who preceded him.
Obama spoke plainly about the ugliness of America's racial history -- from slavery to the many ways minorities have been deprived of equal rights in more recent times. Taking down the Confederate flag is a righteous step, "but God doesn't want us to stop there," he said.
Americans should want to fight poverty with as much effort as they fight hate, and realize that hate isn't always obvious, he said, "so that we're guarding against not just racial slurs, but we're guarding against the subtle impulse to call Johnny back for a job interview, but not Jamal."
The president wrapped up the four-hour funeral in song, belting out the first words of "Amazing Grace" all by himself. Ministers behind him quickly stood up and began singing, too, and the choir and organist and many in the audience of thousands joined in.
Slain along with Pinckney were Cynthia Hurd, 54; Tywanza Sanders, 26; Sharonda Singleton, 45; Myra Thompson, 59; Ethel Lance, 70; Susie Jackson, 87; and the Revs. Daniel Simmons Sr., 74, and DePayne Middleton-Doctor, 49.
Obama named them one by one, shouting that each "found that grace!"
America's first black president sang the hymn less than a mile from where thousands of slaves were sold and where South Carolina signed its pact to leave the union a century and a half earlier.
Throughout the ceremony, the "Mother Emanuel" choir, hundreds strong, led roughly 6,000 people through rousing gospel standards between speakers. A banner alongside Pinckney's closed coffin declared that the killer picked the "Wrong Church! Wrong People! Wrong Day!"
Another 5,000 people were turned away, and had to watch on television, as the funeral was broadcast live across South Carolina.
Justice Department officials broadly agree the shootings meet the legal requirements for a hate crime, meaning federal charges are likely, a federal law enforcement source told The Associated Press on Thursday, speaking anonymously because the investigation is ongoing.
Dylann Storm Roof, now charged with nine murders, embraced Confederate symbols before the attack, posing with the rebel battle flag and burning the U.S. flag in photos. Their appearance online prompted this week's stunning political reversals, despite the outsized role such symbols have played in Southern identity.
Obama praised Gov. Nikki Haley for moving first by asking lawmakers Monday to bring down the flag outside South Carolina's Statehouse. Other politicians then came out saying historic but divisive symbols no longer deserve places of honor.
"It's true a flag did not cause these murders," Obama said. "But as people from all walks of life, Republicans and Democrats, now acknowledge -- including, Gov. Haley whose recent eloquence on the subject is worthy of praise -- as we all have to acknowledge, the flag has always represented more than just ancestral pride."
"Removing the flag from this state's capitol would not be an act of political correctness. 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 -- was wrong. The imposition of Jim Crow after the Civil War, the resistance to civil rights for all people, was wrong."
"It would be one step in an honest accounting of America's history, a modest but meaningful balm for so many unhealed wounds," he said. "It would be an expression of the amazing changes that have transformed this state and this country for the better."
Collins reported from Columbia, South Carolina. Associated Press Writer Eric Tucker in Washington contributed to this report.