The congregants of St. Peter’s African Methodist Episcopal Church in Minneapolis left aside hatred and instead called for love at their first Sunday service following a massacre that left nine blacks dead inside a historic Charleston, S.C., AME church last week, apparently at the hands of a white supremacist.

A display near the altar at St. Peter’s memorialized what are now known as the “Charleston Nine.”

In prayer, song and sermon, St. Peter’s embraced love and forgiveness but also a call to action on racial division, ­economic disparity, crime and injustice.

During the procession, the men’s choir, accompanied by rollicking drums, keyboard, saxophone, as well as human hands and voices, belted out lyrics like, “I’m gonna let my little light shine.”

Worshipers, dressed in their Sunday best, declared in prayer that “The doors of the church are still open!”

“What I see today is not trial but victory,” said the Rev. Nazim Fakir, to “Amens” and applause.

This response to the Charleston attack reflects AME’s history, Fakir, the church pastor, said in an interview.

“We’re a church that was born out of struggle,” he said, referring to the founders of the church, freed slaves who faced racial discrimination when they tried to worship at St. George in Philadelphia.

Since then, the AME Church has been at the center of the civil rights movement. Brown Chapel AME Church served as the staging area of the 1965 march in Selma, Ala., where demonstrators were beaten by police and are now widely credited with helping to bring about passage of the Voting Rights Act.

Sunday’s guest preacher, the Rev. Brian Herron, was selected well before the events in Charleston, but he was a fortuitous voice to talk about forgiveness, having pleaded guilty to corruption charges while on the Minneapolis City Council in 2001 and asking his community’s forgiveness.

Herron gave a fiery sermon that called on the congregation, the black community and the nation as a whole to use the Charleston tragedy as a moral pivot. He was rewarded with lots of “Amens” and applause.

The words fell on some influential ears; the service was attended by Gov. Mark Dayton and a number of elected ­officials who took up the first few pews, though none had alerted the media beforehand.

The sermon embodied some of the cultural and theological traditionalism often heard in historically black churches but not well known to whites given that Sunday services in America remain largely segregated.

Herron touched on sin and redemption, spiritual decline and the need to reverse it through prayer and a ­communal action that works toward justice.

“Will you join me to save this damned world?” he asked in a reference to the doctrine of original sin. “This world is damned if the people of God don’t rise up,” he said.

He decried spiritual malaise as the community’s undoing: “We gave up one of the greatest cultural values that we had. It’s time for us to move back to being people of the spirit.”

In the face of media chatter in some quarters that black America is not focused on black-on-black crime, Herron addressed the issue squarely, as ministers often do on Sundays: “If black lives really matter, then that message has to go into the alleyways and streets of our own communities. It has to matter to us first even before it matters to everybody else.”

It was “men’s day” at the church, which Herron said was fitting during a time of introspection about the state of race and black men in America, where according to an analysis by the Sentencing Project, a black male baby born today has a one-in-three chance of ending up in prison, if trends continue.

Herron came closest to anger at the outset of his sermon when he referred to the newly charged debate over the place of the Confederate flag in the American South. “That flag is still flying,” he said of the Confederate flag on the grounds of the South Carolina Statehouse.

“And it wasn’t even flying at half-mast. That flag that emboldens and embodies and symbolizes white supremacy and slavery was still flying,” he said in disgust.

But Herron said he had pressed his anger into service: “I see all the possibilities of divine hope in the midst of the tragedy. I can fight from a position of love, from the power of transformation and reconciliation that brings about and helps to create a just society.”

Time and again, Herron returned to the theme that in addition to love and prayer, the community must focus on action, including political action, to work for justice: “If we really want to honor these lives that were taken, then there’s some action that’s going to have to happen,” he said to applause.

Echoing the Rev. Dr. Martin Luther King Jr.’s “Letter from a Birmingham Jail,” Herron said, “We can’t wait, y’all.”

Gwen Faction, who said she became one of the first two black telephone operators here in 1949, has been worshiping at St. Peter’s for 58 years.

When asked what the church has given her in times like these, she waited a beat, and then replied with one word.