Barack Obama called for national \"soul searching\" in response to violent riots in Baltimore Getty Images

US President Barack Obama has condemned the violent riots that erupted in Baltimore in the wake of the death of a black man in police custody and said national "soul searching" was required to solve the underlying problems that caused them.

During a White House press conference with Japan's Prime Minister Shinzo Abe, Obama said his thoughts were with Freddie Gray's family and the 15 police officers injured in clashes with protesters on 27 April.

He addressed claims that not enough is being done to address frustrations of communities like Baltimore's.

Obama said: "Since Ferguson and the task force that we put together, we have seen too many incidences of what appears to be police officers interacting with individuals – primarily African American, often poor – in ways that raise troubling questions. What I'd say is this has been a slow rolling crisis. This is not new. And we shouldn't pretend this is new."

The US president urged police forces to work with communities, calling for them to "acknowledge that this is not good for police". However, he added, change needs to go beyond law enforcement.

He said: "We can't just leave this to the police. I think there are police departments that have to do some soul-searching. I think there are some communities that have to do so some soul-searching. But I think we as a country have to do some soul-searching.

"This is not new. It's been going on for decades. If we are serious about solving this problem, then we're going to not only help the police, we're going to have to think about what we can do, the rest of us."

The US president condemned the rioters who torched buildings and attacked police in a wave of violence. "They're not protesting, they're not making a statement, they're stealing," he said.

"They're destroying and undermining businesses and opportunities in their own communities that rob jobs and opportunity from people in that area."

Obama said investment in infrastructure and improvements to the education and justice systems were among policies that could help to improve the lot of impoverished black communities.

"That's hard. That requires more than just the occasional news report or task force," he said. "If we really want to solve the problem, we could, it's just it would require everybody saying this is important, this is significant and that we just don't pay attention to these communities when a CVS burns. And we don't just pay attention when a man gets shot or has his spine snapped."

More than 200 people were arrested in the wake of the riots and 5,000 National Guard troops were deployed on the streets of the city to keep the peace.