US President Barack Obama has condemned a group of youth for their "counterproductive" riot in the city of Baltimore, but stressed the need for "soul searching" in the country.

Obama said on Tuesday that the Baltimore youth that started rioting hours after the funeral of a young black man who died after suffering a severe spinal injury while in police custody had "no excuse" for violence.

"They aren't protesting, they aren't making a statement, they're stealing," said Obama. "It is counterproductive."

He said those in the city who stole from businesses and burned buildings and cars should be treated as criminals.

However, he said there was a need for "soul searching" in the country about communities where young men were more likely to end up in jail or dead than completing school.

"We have seen too many instances of what appears to be police officers interacting with individuals, primarily African American, often poor, in ways that raise troubling questions," said Obama. 

State of emergency

Rioting and looting in a pocket of Baltimore's west on Monday prompted the Maryland governor to declare a state of emergency, a move that activated the deployment of members of the National Guard.

Maryland mayor, Stefanie Rawlings-Blake, also announced a weeklong 10pm to 5am curfew from Tuesday, saying that "too many people have spent generations trying to build this city for it to be destroyed by thugs, who in a very senseless way are trying to tear down what people have fought for".

Extra police were deployed across the city and an American League baseball match to be contested by Baltimore's Orioles was postponed.

Police said at least seven officers were wounded in clashes after the earlier memorial service, suffering broken bones after demonstrators started throwing bricks and stones.

Baltimore police captain Eric Kowalczyk said that one officer was "unresponsive” and that the attack took place "without provocation".

A man stands in front of a police line during clashes in Baltimore [Reuters]

Police responded with pepper spray, tear gas and riot shields, the Baltimore Sun reported. Maryland Governor Larry Hogan announced on Monday night that he was activating the state's National Guard to address the unrest.

"Today's looting and acts of violence in Baltimore will not be tolerated," Hogan said. "I strongly condemn the actions of the offenders who are engaged in direct attacks against innocent civilians, businesses and law enforcement officers," he added, charging that violent acts "betray the cause of peaceful citizens seeking answers and justice following the death of Freddie Gray".

Helicopter news footage showed people entering stores. Shops were looted and cars were set on fire. Smoke billowed from a pharmacy after it was apparently set ablaze.

Peace march

Gray's family, who were hoping to organise a peace march later this week, condemned the violence, and said the problem of police brutality was not solely caused by police.

"It's about black men stepping forward and owning their portion of the problem," the family's lawyer, Billy Murphy, said.

"We live here. We love it here. It's not perfect. It's like being in a bad marriage but we're not interested in a divorce. We love this city and we're here to work as hard as we can and as long as we can until this problem has gone away," Murphy said.

The violence came after thousands of mourners gathered to pay tribute to Gray, 25, whose death in police custody has become the latest touchstone in a national debate over police use of force.

Gray died on April 19, a week after being arrested. Gray was arrested after he made eye contact with officers and ran away. Officers held him down, handcuffed him and loaded him into a van. While inside, he became irate, and leg cuffs were put on him, police said.

Gray asked for medical help several times, beginning before he was placed in the van. After a 30-minute ride that included three stops, paramedics were called. 

Authorities have not explained how or when Gray's spine was injured. His injuries included three fractures in his neck vertebrae, a smashed voicebox and the severing of 80 percent of his spine.

Police move a young protester following the funeral of Freddie Gray [AP]

Source: Agencies