As riots raged in his home city of Baltimore Democratic presidential contender Martin O'Malley canceled a series of paid speeches in Ireland and flew back to Baltimore, where he was mayor for eight years from 1999 to 2007.

Following his stint as mayor he was elected governor of Maryland, a position he held for eight years until January 2015.

O'Malley, who has roots in Mayo and Galway, had been in Dublin with plans for three paid speeches to audiences that included Price Waterhouse and IBM executives. However, he abruptly left to come back to the US.

O'Malley stated over the weekend in South Carolina that Americans must "talk with one another" and "acknowledge our fears and our shortcomings" to stop police shootings.

The riots in Baltimore came in the wake of the death of Freddie Gray, a Baltimore man who allegedly didn't receive medical attention for serious injuries including a broken spine while in custody and being transported by a police van.

Gray’s funeral was on Monday and it proved a major flashpoint as rioting commenced. High school students and members of violent gangs were suspected of being behind the worst rioting.

Speaking with reporters, O'Malley said Gray's death was "another awful and horrific loss of life."

He said that police departments need to become more "open and transparent" to "save lives in the future."

"Whenever, whether it is a police custodial death or a police involved shooting, we all have a responsibility to ask whether there are things we can do that would prevent such a loss of life from happening in the future," O'Malley said.

"There is a lot of grief and a lot of anguish and we have seen it around the country. And we are going to continue to see more of these images since we all now have cell phones and video cameras," he said.

"And there is probably very few issues quite as intertwined with the very painful racial legacy in our country as the issue of law enforcement and public safety."

O'Malley is expected to announce for president in May. He has also been spoken of as a potential VP on a Hillary Clinton ticket. He said when he ran for mayor in 1999, Baltimore was the "most violent, most addicted, most abandoned city in America," and that he "set out to make our city work again, to make the dream true again."

"Together, in other words, we put into action that powerful belief that, that in our community, there is no such thing as a spare American. That we are all in this together," O'Malley said.

"Over the next 10 years, Baltimore went on to achieve the biggest reduction in part one crime of any major city in America.”