The drama surrounding the death of a young black man in police custody in Baltimore has taken a new and unexpected twist after it was announced that charges were being brought against six officers, one of whom was being charged with murder.

In an surprise announcement that will likely help defuse tensions in Baltimore and other cities that has seen angry protests, a state prosecutor said warrants had already been announced for the officers who seized 25-year-old Freddie Gray. One of the officers faces up to 30 years imprisonment if convicted.

“It is my duty to examine the evidence and apply this to the case to decide whether an individual should be charged,” said Marilyn Mosby, the Baltimore City State’s Attorney, as cheers erupted from a gathered crowd.

“The finding of our comprehensive, thorough and independent investigation, coupled with the medical examiner’s determination, is that Mr Gray’s death was a homicide. We have probable cause to file criminal charges.”

Prosecutor Marilyn Mosby said she had a duty to the people of Baltimore (Baltimore City State's Attorney Office)

She added: “Mr Gray suffered a severe and critical neck injury as a result of being handcuffed, shackled by his feet and unrestrained inside of the Baltimore Police Department wagon.”

Mr Gray, 25, was detained by officers on April 12 and died a week later after his spinal cord was severed when he was taken into custody. The city of Baltimore has simmered eversince.

His death triggered peaceful protests and his funeral on Monday was followed by riots in parts of the city that saw cars and businesses set on fire and crowds of youths hurl stones and bottles at police.

Ms Mosby’s announcement on Friday morning stunned most people, coming as it did without warning and following a series of reports that suggested a preliminary inquiry had found Mr Gray may even have intentionally harmed himself. Indeed, the news came as police and national guard troops – and police in other cities - were bracing for a weekend of demonstrations.

Those who had been protesting and campaigning in recent days welcomed the news and in some parts of Baltimore crowds gathered to cheer.

After Freddie Gray: Baltimore unrest in pictures Show all 22 1 /22 After Freddie Gray: Baltimore unrest in pictures After Freddie Gray: Baltimore unrest in pictures Baltimore riots Police and firefighters respond in front of a building that caught fire as protests of the death of Freddie Gray continue in Baltimore After Freddie Gray: Baltimore unrest in pictures Baltimore riots A Baltimore firefighter cuts his way into a burning convenience store with a saw to attack a fire set by rioters at East Biddle Street and Montford Avenue in Baltimore After Freddie Gray: Baltimore unrest in pictures Baltimore riots A Baltimore firefighter climbs onto a rooftop to attack a fire set by rioters in a convenience store and residence at East Biddle Street and Montford Avenue After Freddie Gray: Baltimore unrest in pictures Baltimore riots Baltimore firefighters attack a fire in a convenience store and residence during clashes after the funeral of Freddie Gray in Baltimore After Freddie Gray: Baltimore unrest in pictures Baltimore riots Gloria Darden, mother of Freddie Gray, covers her face during a news conference after a day of unrest following the funeral of Gray After Freddie Gray: Baltimore unrest in pictures Baltimore riots The family of Freddie Gray gather with clergy and pray during a news conference in Baltimore After Freddie Gray: Baltimore unrest in pictures Baltimore riots Rioters burned police vehicles and pelted officers with stones AP After Freddie Gray: Baltimore unrest in pictures Baltimore riots A man has pepper spray cleaned from his eyes Getty Images After Freddie Gray: Baltimore unrest in pictures Baltimore riots Baltimore police officers form a line in front of protesters Getty Images After Freddie Gray: Baltimore unrest in pictures Baltimore riots Looters ransacked shops and torched police cars amid the unrest AP After Freddie Gray: Baltimore unrest in pictures Baltimore riots A CVS chemist outlet burns in Baltimore after it was set alight by rioters AP After Freddie Gray: Baltimore unrest in pictures Baltimore riots The Shaheed family assess the damage to their store in downtown Baltimore David Usborne After Freddie Gray: Baltimore unrest in pictures Baltimore riots The riots broke out just a few streets from the church where the funeral was held AP After Freddie Gray: Baltimore unrest in pictures Baltimore riots A protester is detained in Baltimore following the funeral of Freddie Gray earlier in the day AP After Freddie Gray: Baltimore unrest in pictures Baltimore riots Police in front of a building that caught fire after being looted EPA After Freddie Gray: Baltimore unrest in pictures Baltimore riots A youth washes out pepper spray from his eyes near a building that caught fire after being looted EPA After Freddie Gray: Baltimore unrest in pictures Baltimore riots People pose for photographs on the hood of a Baltimore Police car destroyed by demonstrators GETTY After Freddie Gray: Baltimore unrest in pictures Baltimore riots The riots broke out just a few streets from the church where the funeral was held for Freddie Gray GETTY After Freddie Gray: Baltimore unrest in pictures Baltimore riots Demonstrators threw rocks and other objects at police following the funeral of Freddie Gray AP After Freddie Gray: Baltimore unrest in pictures Baltimore riots Arrests have been made, with many of those involved appearing to be school children and students AP After Freddie Gray: Baltimore unrest in pictures Baltimore riots Protests over Freddie Gray's death turned violent Reuters After Freddie Gray: Baltimore unrest in pictures Baltimore riots The circumstances surrounding Freddie Gray's death in custody still remain unclear AP

“This is a great day,” said local Congressman Elijah Cummins. “Even if we are in the evening of our lives, we want to make sure that our children have a better morning.”

The most serious charges – including one of so-called depraved heart murder – were levelled agaisnt Caesar Goodson, the driver of the police vehcicle into which Mr Gray had been pushed. He was charged with second-degree murder, manslaughter, assault and misconduct in office.

Lt Brian Rice was charged with manslaughter, assault, misconduct in office and false imprisonment. Officer William Porter and Sgt Alicia White were each charged with manslaughter, assault and misconduct in office.

Meanwhile, officers Edward Nero and Garrett Miller were charged with assault, misconduct in office and false imprisonment.

Ms Mosby said the officers had failed to strap the young man into the police wagon and had repeatedly failed to seek medical attention for him after he suffered grievous injuries. She also said that a switchblade Mr Gray was carrying was legal under local law and that police therefore had no legitimate reason to arrest him.

The police union wrote to Ms Mosby’s office calling for the appointment of an independent probe and the Fraternal Order of Police’s local president, Gene Ryan, said the six charged officers were not responsible for Mr Gray’s death.

President Barack Obama said it was essential that all the evidence in the case was considered. “These individuals charged are entitled to due process and the rule of law."