SAN FRANCISCO - US President Barack Obama voiced confidence Friday that a “shocked and heartbroken” nation would eventually tighten permissive gun laws, striking a more strident tone after the deadly Charleston shooting.

Obama told US mayors in San Francisco that change would come one day, as he took on detractors who accused him of politicizing the deaths of nine black worshippers in South Carolina. Describing gun crime as a crisis that “tears at the fabric of a community” and “costs this country dearly,” Obama said: “More than 11,000 Americans were killed by gun violence in 2013 alone. 11,000.”

He accused Congress of failing to act after a mass shooting in Newtown, Connecticut, in 2012 which killed 26 people, including 20 children, at Sandy Hook elementary school. “We wouldn’t have prevented every act of violence or even most,” Obama said.

“We don’t know if it (gun reform) would have prevented what happened in Charleston. No reform can guarantee elimination of violence, but we might still have some more Americans with us. “We might have stopped one shooter, some families might still be whole. You all might have to attend fewer funerals.”

In the immediate aftermath of the Charleston shooting Obama had voiced resignation that change would not come in the autumn of his eight-year term in office. On Friday he sounded more resolute and called for an honest debate. “At the very least we should be able to talk about this issue as citizens. Without demonizing all gun owners who are overwhelmingly law abiding, but also without suggesting that any debate about this involves a wild-eyed plot to take everybody’s guns away,” he said. “I’m not resigned. I have faith we will eventually do the right thing,” he said. “We have the capacity to change, but we have to feel a sense of urgency about it.” Moreover, Barack Obama will in late July become the first sitting American leader to visit Ethiopia and the headquarters of the African Union, the White House said Friday.

Obama’s trip to Addis Ababa will come directly after an already announced trip to Kenya, his first as president to his father’s homeland, press secretary Josh Earnest announced. Obama will meet both the Ethiopian government and AU leaders, for talks on how to “accelerate economic growth, strengthen democratic institutions and improve security.”

The election of the United States’ first black president — and the first with an African parent — raised high hopes on the continent, but Obama has been a cautious friend. In August last year, the White House hosted a huge Washington summit of African leaders and the upcoming July trip is intended to build on progress towards closer economic ties.

A presidential visit to Kenya had been put on ice while President Uhuru Kenyatta faced charges of crimes against humanity for his role in 2007-2008 post-election violence. The International Criminal Court has since suspended that prosecution, citing a lack of evidence and Kenya’s failure to cooperate. Human rights groups have questioned the visit to Kenya, but are also asking why Obama is visiting Ethiopia so soon after a contested election. Africa’s second most populous nation held a vote in May that was described by many independent observers as flawed. The governing party, which has ruled for over two decades, won a landslide, amid opposition allegations of intimidation and vote rigging.

“The decision by President Obama to travel to Ethiopia, which has seen three opposition party members murdered this week alone, is very troubling,” Jeffrey Smith of the Robert F. Kennedy Center for Justice & Human Rights told AFP.

Smith said the timing, and the symbolism of Obama’s trip, would “further solidify the image that America stands behind Africa’s autocrats.” The White House stressed that it frequently addresses issues of democracy and political rights with countries in the region.

“We regularly, both in public and in private, communicate our concerns about some of the issues,” White House spokesman Eric Schultz said. “I don’t think that is going to stop because of this visit.” Ethiopia and Kenya have both been on the frontline of the fight against Somalia’s Al-Qaeda-allied militia Shebab, and have been important security partners to Washington. Shebab units have been hunted by African Union troops and US drones inside Somalia — but have outflanked the Kenyan contingent in Somalia to mount a string of gruesome cross-border raids. In April last year the group attacked a university in Garissa, Kenya killing 148 people — most of them students.