A mistrial has been declared in the trial of Officer William Porter for the in-custody death of Freddie Gray. He was the first of six Baltimore, Maryland police officers to be tried in the case, but a hung jury will require a second trial for him.

Porter was not one of the three officers who initially arrested Gray, a 25-year-old man who ran from police after making eye contact with a bike cop on April 12. The 26-year-old officer was along for the 45-minute ride in a police transport van as it made the last five of six stops between Gray's arrest and arriving at the station.

Porter was accused of not buckling the prisoner into the transport van ‒ in violation of a Baltimore Police Department directive issued weeks earlier ‒ and of failing to get medical assistance for Gray during the stops he was present for, despite pleas from the prisoner that he needed help and could not breathe. Gray suffered a severe spinal-cord injury and died a week after his arrest.

Charged with involuntary manslaughter, second-degree assault, reckless endangerment, and misconduct in office in the in-custody death, Porter faced up to 25 years in prison. The jury was deadlocked on all four counts, NPR reported.

Gray and Porter grew up in the same West Baltimore neighborhood and were less than two months apart in age. Although their backgrounds were similar, Gray turned to drug dealing, while Porter became a police officer. At the time of his death, Gray was struggling to break away from his life as a dealer on West Baltimore’s corners, the Baltimore Sun reported.

Despite Gray’s previous run-ins with the law, prosecutors argued that Porter should have sought medical attention when Gray requested it. The 26-year-old officer testified that he was not sure whether Gray was faking his injury.

After Gray’s funeral, widespread protests against police brutality and vigils in remembrance of Gray turned into riots, which eventually cost the city at least $20 million, the Baltimore Sun reported.

The city is preparing itself for the possibility of more violence upon the verdict. Authorities opened an emergency operations center Monday and warned students that the Constitutional right to protest won’t apply to them. The Maryland National Guard, which patrolled the city in the days after riots broke out, has been put on standby.

Mayor Stephanie Rawlings-Blake urged Baltimore residents not to riot after the hung jury was announced.

“As a unified city, we must respect the outcome of the judicial process,” she said in a statement. “In the coming days, if some choose to demonstrate peacefully to express their opinion, that is their constitutional right. I urge everyone to remember that collectively, our reaction needs to be one of respect for our neighborhoods, and for the residents and businesses of our city.”

At least one person has been taken into police custody in the wake of the mistrial announcement.

Baltimore City Public Schools CEO Gregory Thornton sent a letter home with students on Monday warning that "student walkouts, vandalism, civil disorder and any form of violence are not acceptable."

On Tuesday, defense attorneys filed a motion asking for a mistrial and a change of venue based on the letter, arguing that, although Baltimore City Circuit Court Judge Barry G. Williams had been “very diligent” in reminding jurors not to read news or other outside information about the case, the court never said, "Don't open your child's homework packet."

Williams quickly denied the motion, saying he did not believe that the letter was "an appropriate reason" for a mistrial or venue change.

The trial lasted two weeks, with the jury comprised of seven men and five women who deliberated for three days before declaring they could not come to a unanimous verdict. They began with three hours of deliberation on Monday before being sent home. On their second day of deliberations, the jury discussed the trial for six hours before sending a note to Williams to say they were deadlocked. Williams told them to return to work and deliberate because their “verdict must be unanimous,” the New York Times’ Sheryl Stolberg reported.

All six officers involved in Gray’s arrest are being tried separately. Officer Caesar Goodson Jr., the driver of the police transport van, will have the next case to be heard by a jury, with his trial set for January 9. That case will be followed by that of Sergeant Alicia White starting on January 25, Officer Garrett Miller on February 9, Officer Edward Nero on February 22 and Lieutenant Brian Rice on March 9. They have all pleaded not guilty.

Porter was the first officer to be tried because prosecutors want to use him as a witness in the trials of several of the other officers, AP reported.

A new trial date for Porter will be set on Thursday, according to the Baltimore Sun's Justin Fenton. The officer will not be in attendance for it.

The only way for a definitive conclusion to these trials is to have the cases be heard by a judge and not juries, attorney Warren Brown, who was not involved with the Porter trial, told WBZ. He also suggested a change of venue outside of Baltimore.

It “feels like Vietnam,” Brown said, describing the atmosphere in the city as a police helicopter circled above the courthouse.