BALTIMORE, MD -- A judge declared a hung jury Wednesday after the panel couldn't reach a decision in the manslaughter trial of a Baltimore police officer charged in the death of Freddie Gray, whose injury in police custody sparked weeks of protests and fueled the nation's scrutiny of how police treat black suspects.

William Porter's trial was the first test of prosecutors' case against six officers in a city struggling to rein in violent crime. The case hinged not on what Porter did, but what prosecutors said he didn't do. He was accused of failing to get medical help for a critically wounded Gray and was charged with manslaughter, assault, misconduct in office and reckless endangerment.

The charges carried maximum prison terms totaling 25 years. It was not immediately clear whether Porter would be tried again.

Wednesday was the third day of deliberations for the jury of seven women and five men. They deliberated for a total of about 15 hours. On Tuesday, they indicated they were deadlocked, but the judge told them to keep working.

The jurors made several requests since they began deliberating Monday. The judge has granted some and denied others, saying they were not part of the evidence. On Wednesday, they asked for a copy of a transcript from a witness, but the judge refused.

Before Williams dismissed the jurors, he told them, "You have clearly been diligent."

Meanwhile, during deliberations Wednesday, a handful of protesters gathered outside the courthouse, chanting "send those killer cops to jail."

Gray, who was arrested while fleeing from police, died April 19, a week after his neck was broken while the seven-block trip turned into a 45-minute journey around West Baltimore. The autopsy concluded that Gray probably suffered the injury from being slammed against the compartment's metal wall during cornering or braking.

Gray was black. Porter is also black, as are two of the other five officers charged.

It wasn't clear how the mistrial would affect the state's cases against the other officers. Prosecutors had planned to use Porter's testimony against two of his fellow officers.

Several other recent cases against police officers charged in deadly confrontations with black men have ended similarly. In August, a North Carolina jury deadlocked in the trial of Charlotte-Mecklenburg Officer Randall Kerrick. Prosecutors said they won't retry the white officer for voluntary manslaughter in the September 2013 shooting death of Jonathan Ferrell, who was unarmed.

In June, a South Carolina jury couldn't reach a verdict in the retrial of former Eutawville Police Chief Richard Combs, who is white. His lawyer said Combs acted in self-defense in the May 2011 shooting of Bernard Bailey, who was unarmed.

Combs pleaded guilty in September to misconduct in office. He was sentenced to a year of home detention.

Prosecutors in Porter's trial argued he was criminally negligent for ignoring a Baltimore Police Department policy requiring officers to seat belt prisoners, and for not calling an ambulance immediately after Gray indicated he needed medical help.

Porter, who was driving a patrol car the day Gray was arrested, was present at five of the van's six stops during its circuitous trip.

The defense said Porter went beyond the call of duty in helping the handcuffed and shackled prisoner move from the floor of the van to a bench in the wagon, and in telling the van driver and a supervisor that Gray said he needed to go to a hospital. The defense mainly cast blame on the van driver, Officer Caesar Goodson, whose trial is scheduled to begin Jan. 6.