President Obama on Thursday expressed his sorrow about the shooting at a historic black church in Charleston that left nine people dead on Wednesday, and he said the American government has the power to address gun violence.

Obama lamented that “someone who wanted to inflict harm had no trouble getting their hands on a gun.”

He said that violence of this nature “doesn’t happen in other places with this kind of frequency.” He noted that lawmakers in Washington, D.C., were not likely to address gun violence in the near future, but said that the country must “shift how we think about the issue of gun violence collectively.”

He also brought up the significance of an attack on a church founded by African Americans.

“Any death of this sort is a tragedy,” he said during a press conference. “There’s something particularly heartbreaking about a death happening in a place in which we seek solace, and we seek peace, in a place of worship.”

Obama said that he knew the Rev. Clementa Pinckney, who served as a Democratic state lawmaker and was among those killed at the Emanuel African Methodist Episcopal church. And he noted that Emanuel AME was “founded by African Americans seeking liberty.”

He recounted the church’s storied history — Emanuel AME was burned to the ground in 1822 when it was linked to a planned slave revolt, and was often a launching point for civil rights marches

“This is a sacred place in the history of Charleston and in the history of America,” Obama said.

Obama concluded his statement by invoking Martin Luther King Jr., and stating that the Emanuel AME will recover following Wednesday’s shooting.

“Mother Emanuel church and its congregation have risen before, from flames, an earthquake, from other dark times, to give hope to generations of Charlestonians, and with their prayers and our love, and the buoyancy of hope, they will rise again now as a place of peace,” he said.

Watch Obama’s full remarks, courtesy of PBS NewsHour:

Read the President’s full statement:

Good afternoon, everybody. This morning, I spoke with, and Vice President Biden spoke with, Mayor Joe Riley and other leaders of Charleston to express our deep sorrow over the senseless murders that took place last night.

Michelle and I know several members of Emanuel AME Church. We knew their pastor, Reverend Clementa Pinckney, who, along with eight others, gathered in prayer and fellowship and was murdered last night. And to say our thoughts and prayers are with them and their families, and their community doesn’t say enough to convey the heartache and the sadness and the anger that we feel.

Any death of this sort is a tragedy. Any shooting involving multiple victims is a tragedy. There is something particularly heartbreaking about the death happening in a place in which we seek solace and we seek peace, in a place of worship.

Mother Emanuel is, in fact, more than a church. This is a place of worship that was founded by African Americans seeking liberty. This is a church that was burned to the ground because its worshipers worked to end slavery. When there were laws banning all-black church gatherings, they conducted services in secret. When there was a nonviolent movement to bring our country closer in line with our highest ideals, some of our brightest leaders spoke and led marches from this church’s steps. This is a sacred place in the history of Charleston and in the history of America.

The FBI is now on the scene with local police, and more of the Bureau’s best are on the way to join them. The Attorney General has announced plans for the FBI to open a hate crime investigation. We understand that the suspect is in custody. And I’ll let the best of law enforcement do its work to make sure that justice is served.

Until the investigation is complete, I’m necessarily constrained in terms of talking about the details of the case. But I don’t need to be constrained about the emotions that tragedies like this raise. I’ve had to make statements like this too many times. Communities like this have had to endure tragedies like this too many times. We don’t have all the facts, but we do know that, once again, innocent people were killed in part because someone who wanted to inflict harm had no trouble getting their hands on a gun. Now is the time for mourning and for healing.

But let’s be clear: At some point, we as a country will have to reckon with the fact that this type of mass violence does not happen in other advanced countries. It doesn’t happen in other places with this kind of frequency. And it is in our power to do something about it. I say that recognizing the politics in this town foreclose a lot of those avenues right now. But it would be wrong for us not to acknowledge it. And at some point it’s going to be important for the American people to come to grips with it, and for us to be able to shift how we think about the issue of gun violence collectively.

The fact that this took place in a black church obviously also raises questions about a dark part of our history. This is not the first time that black churches have been attacked. And we know that hatred across races and faiths pose a particular threat to our democracy and our ideals.

The good news is I am confident that the outpouring of unity and strength and fellowship and love across Charleston today, from all races, from all faiths, from all places of worship indicates the degree to which those old vestiges of hatred can be overcome. That, certainly, was Dr. King’s hope just over 50 years ago, after four little girls were killed in a bombing in a black church in Birmingham, Alabama.

He said they lived meaningful lives, and they died nobly. “They say to each of us,” Dr. King said, “black and white alike, that we must substitute courage for caution. They say to us that we must be concerned not merely with [about] who murdered them, but about the system, the way of life, the philosophy which produced the murderers. Their death says to us that we must work passionately and unrelentingly for the realization of the American Dream.

“And if one will hold on, he will discover that God walks with him, and that God is able to lift you from the fatigue of despair to the buoyancy of hope, and transform dark and desolate valleys into sunlit paths of inner peace.”

Reverend Pinckney and his congregation understood that spirit. Their Christian faith compelled them to reach out not just to members of their congregation, or to members of their own communities, but to all in need. They opened their doors to strangers who might enter a church in search of healing or redemption.