The pastor of Mother Bethel A.M.E. Church bleakly summarized the task at hand for the hundreds who gathered Thursday night at an interfaith service to cope with the massacre of nine black worshipers inside a sister African Methodist Episcopal church in South Carolina.

"So we're here tonight as a grieving community, fighting and struggling to keep our faith," said the Rev. Mark Kelly Tyler to the nearly full house at his historic Society Hill church.

They had also come together, he added, "to declare that darkness is not more powerful than light."

He later noted the mix of believers in the audience, saying, "Most of you are not A.M.E."

To which a man shouted from the back of the church, "We're all A.M.E. tonight!"

The spontaneous exchange led to a standing ovation, an acknowledgment of the great challenge from everyone responding to the mass killing Wednesday night at Mother Bethel's sister house of worship in Charleston, Emanuel A.M.E. Church.

One thing was certain from the pulpit to the pews: This was an act of terrorism.

"More Americans were killed yesterday than at the Boston Marathon and than have been beheaded by ISIS," said Melissa Byrne, who is white and lives in West Philadelphia.

Bridgett Bolden, 38, who is black and lives in Society Hill, said Americans need to come to grips with "these acts of domestic terrorism."

But as she prepared to enter the church, founded by African Americans in 1794, she had a more immediate concern: "Tonight, I just want some healing to come out of this."

After the service, Nyasha Junior, an assistant professor of religion at Temple University, said her reaction was one of "just horror."

"As an A.M.E., I know about Wednesday night Bible study with the pastor, and I can imagine myself there, and so to think that a place of sanctuary, a place of worship, a place of refuge, would be somewhere that a mass murderer would be welcomed in and join in prayer and then slaughter people, was just horrific to me."

In Philadelphia, the birthplace of the A.M.E. denomination two centuries ago, there was an intimacy to the grief that flowed across congregations and faiths.

"Anger. Disappointment. Heartache. Outrage. The full gamut of emotions," Tyler said earlier in the day.

Like the house of prayer in Charleston, Mother Bethel stands just a short distance from the city's colonial district.

Rabbis, imams, Catholic priests - all texted, called, or e-mailed during the day, Tyler said.

"It was an extreme violation of something that's basic to humanity," Tyler said. "Even people who don't believe in God believe in the notion of sanctuary."

"It's madness," Mayor Nutter told reporters after a bill signing at City Hall. He called the shooting "unfathomable," and said it left him "stunned and saddened."

From the floor of City Council, Councilman Kenyatta Johnson called it "a sad day in America. . . . You have nine people murdered senselessly."

Police apprehended the suspected gunman, Dylann Storm Roof, 21, of Eastover, S.C., Thursday morning in Shelby, N.C. Roof is white. Authorities were investigating the deaths as a hate crime.

Roof walked into the church and sat with the group for about an hour before opening fire about 9 p.m., authorities said.

The massacre reminded people of the bombing of a black Baptist church in Alabama in 1963 that left four African American girls dead. It also attacked the A.M.E. principle of welcoming all worshipers.

"We have an open-door policy, so it's heartbreaking for someone to walk into a place that has for years and years been a place of safety and comfort," said the Rev. Natalie Mitchem, executive director of the national church's health commission and a pastor of Calvary A.M.E. Church in South Philadelphia.

"We don't know all the facts about why this man did this," Tyler said, "but we certainly do know there are many people in this country who are not happy with the advancements African Americans have made and are determined to turn back the clock."

Among the dead was the church's pastor, the Rev. Clementa C. Pinckney, a man well known to the Philadelphia area's ecumenical leaders.

"Even in the worst of scenarios, he would just smile, he would lighten up whatever was going on," said the Rev. Miriam J. Burnett, pastor at New Bethel A.M.E. in Willow Grove, who was ordained with Pinckney in 1995 and got to know him well.

Burnett said Pinckney, 41, a state senator and a married father of two, had "an infectious smile."

When she got a call at 1:30 a.m. saying Pinckney had been killed, "I just started crying," she said.

They were supposed to see each other again in two weeks in New Orleans, she said.

Pinckney and Tyler, his counterpart at Mother Bethel, at Sixth and Lombard Streets, held two of their church's most prestigious posts. Tyler, at 48 just a few years older than Pinckney, said the two were friends.

"It's an honor of a lifetime to serve as pastor of either one of these congregations," Tyler said.

While prayers and reflection were abundant, there also was outrage and disgust.

"It's a tragedy, and my prayers go out to their families and to all of the people that they loved," said Yaba Blay, who teaches African American studies at Drexel University. She said she was angry and offended: "They don't deserve this."

Ahmir "Questlove" Thompson, the Philadelphia-born drummer of the Roots, expressed his opinion on Twitter: "the media BETTER call this an act of terrorism or else i will call them on it."

Bishop Gregory G.M. Ingram, presiding prelate of the A.M.E. church in Philadelphia, struck a more reflective note:

"We can only just hold our breath and pray mightily in the midst of it all that God and the prayers of so many will bring peace to help weather part of this storm."

215-854-2431@Panaritism

Contributing to this article were Inquirer staff writers Ben Finley, Sarai Flores, Jeff Gammage, and Tricia L. Nadolny.