CHARLESTON, S.C. (AP) — Thousands of mourners joined in song, sorrow and applause Friday before President Barack Obama’s eulogy for nine black churchgoers who police said were slain in a racially motivated attack.

The “Mother Emanuel” choir, hundreds strong, led roughly 6,000 people through rousing gospel standards between speakers who celebrated the legacy of state Sen. Clementa Pinckney and his fellow churchgoers.

“Someone should have told the young man. He wanted to start a race war. But he came to the wrong place,” The Right Rev. John Richard Bryant said to rounds of applause. A banner alongside Pinckney’s closed coffin declared “WRONG CHURCH! WRONG PEOPLE! WRONG DAY!”

Applause also rang out as state Sen. Gerald Malloy, Pinckey’s Senate suitemate and his personal lawyer, noted how the slayings have suddenly prompted a reevaluation of Civil War symbols that were invoked to assert white supremacy during the South’s segregation era.

“All the change you wanted to see and all the change you wanted to do — because of you, we will see the Confederate flag come down in South Carolina,” Malloy said.

But he also urged the crowd to keep working for the racial and political unity Charleston has experienced since the shootings. After all, he said, Pinckney’s last act was to open his church to a stranger.

“Let us not close the doors that Sen. Pinckney gave his life for us to open,” he said.

Obama and Vice President Joe Biden sang and clapped along as they sat with relatives of the victims in the front row. Also attending were first lady Michelle Obama, Jill Biden, and dozens of prominent lawmakers and civil rights leaders.

The somber setting in Charleston provided a marked contrast to the jubilant mood at the White House, where Obama and his advisers celebrated back-to-back Supreme Court rulings upholding Obamacare and gay marriage.

Justice Department officials broadly agree that the shootings inside the Emanuel African Methodist Episcopal Church 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 on condition of anonymity because the investigation is ongoing.

Metal detectors, bag searches and the visible presence of Secret Service agents throughout the arena at the College of Charleston added to heightened sensibilities at Friday’s service, another wrenching but cathartic occasion for the community to say goodbye.

“I’m here to hear Obama speak hopefully on racism, forgiveness and justice,” said Wannetta Mallette, of North Charleston, where a white police officer faces murder charges in the shooting of an unarmed black man. “I think everyone is here to share in the grief and sorrow,” she said.

The revelation that Dylann Storm Roof had embraced Confederate symbols before the attack, posing with the rebel battle flag and burning the U.S. flag in photos posted online, prompted a stunning turnaround on symbols that have played a large role in Southern identity.

Gov. Nikki Haley moved first, asking lawmakers Monday to bring down the flag outside South Carolina’s Statehouse. Other politicians then leaped through that opening, saying that historic but divisive symbols no longer deserve places of honor.

Some have worried about people taking matters into their own hands.

“Black Lives Matter” has been spray-painted on monuments around the South. Police are also investigating arson attacks against two African-American churches — in Charlotte, North Carolina; and Macon, Georgia.

In Charleston, gestures of forgiveness by the victims’ families when the 21-year-old suspect appeared on murder and gun charges last Friday set a healing tone.

Pinckney’s cousin, Donald Sheftal, said he was a great man, but the others who died with him were great, too, and no one should forget what their deaths have already accomplished.

“Let us remember the sacrifice of the nine that moved the governor to call for the removal of the flag and brought the president to Charleston,” he said.