Prosecutors in Baltimore failed for the fourth time to secure a conviction in the Freddie Gray case, with Circuit Judge Barry G. Williams acquitting Lt. Brian Rice of all charges Monday related to Gray's arrest and death.

Williams cleared Rice, 42, of involuntary manslaughter, reckless endangerment and misconduct in office in a downtown Baltimore courtroom. The judge had dismissed a second-degree assault charge at the trial's midpoint, and prosecutors dropped a second misconduct charge at the start.

Rice chose a bench trial rather than a jury trial, putting his legal fate in Williams' hands. He was the fourth of six officers charged in the case to go to trial, and the third to be acquitted by Williams. Another officer's trial ended with a hung jury and mistrial.

Prosecutors alleged that Rice, the highest-ranking officer of the six charged, had caused Gray's death by failing to secure him in a seat belt in the back of the van, where Gray suffered severe spinal cord injuries last year. Gray, 25, died a week after his arrest. His death sparked widespread protests against police brutality.

Williams, reading from prepared remarks, said prosecutors failed to meet their burden of proving the charges against Rice beyond a reasonable doubt, instead asking the court to rely on "presumptions or assumptions" — something it cannot do. He said the court "cannot be swayed by sympathy, prejudice or public opinion."

Based on the law, he said, the prosecution did not show that Rice acted in a "grossly negligent manner," required for a manslaughter conviction. It also did not show that Rice acted in an unreasonable way or was aware of and chose to ignore the substantial risk by placing Gray in a police van without a seat belt, which is required for reckless endangerment, he said. And, it did not show that Rice acted "corruptly," which is required for misconduct in office, he said.

Williams said a "mistake" or an "error in judgment" by Rice was not enough to prove the crimes alleged.

Photos from the trial of Lt. Brian Rice, the highest-ranking Baltimore police officer charged in the arrest and death of Freddie Gray.

He also noted the difference between criminal negligence and civil negligence, an apparent nod to the fact that the city previously negotiated a $6.4 million settlement with Gray's family to avoid a civil trial.

"Here, the failure to seat-belt may have been a mistake or it may have been bad judgement," Williams said, "but without showing more than has been presented to the court concerning the failure to seat-belt and the surrounding circumstances, the state has failed to meet its burden to show that the actions of the defendant rose above mere civil negligence."

Baltimore State's Attorney Marilyn J. Mosby, who announced the charges against the officers in May 2015, was not present in court. Prosecutors and defense attorneys in the case are barred by a gag order from commenting, as is Rice. Williams also does not comment on cases outside of court.

William H. "Billy" Murphy, the attorney for Gray's family, did not attend and did not respond to a request for comment.

Rice appeared calm, staring forward and showing no emotion as Williams read his decision. At the adjacent table, Chief Deputy State's Attorney Michael Schatzow and Deputy State's Attorney Janice Bledsoe, who prosecuted the case, shook their heads. Schatzow sat with his chin resting on his hand for much of Williams' comments. At one point, Bledsoe leaned back in her chair and rolled her head around.

When Williams adjourned the proceedings, Rice stood and shook hands with his attorneys and Lt. Gene Ryan, president of the Fraternal Order of Police Lodge 3, the union that represents Baltimore officers. With his acquittal, Rice will have his pay restored by the Baltimore Police Department but remain suspended while an internal administrative review of his actions is conducted.

Rice's family members, who were present for the ruling, declined to comment.

Officer Caesar Goodson Jr., the van driver acquitted by Williams last month of second-degree depraved-heart murder and other charges, smiled and shook Rice's hand as the courtroom emptied. The city last week authorized $87,000 in back pay for Goodson. Rice is also likely to receive back pay.

Officer Edward Nero, who was acquitted of all charges in May, and Officer Garrett Miller, who is scheduled to go to trial July 27, were also in the courtroom.

Officer William Porter, who had a mistrial in December and will be retried Sept. 6, was not present, though his attorney was. Also not in attendance was Sgt. Alicia White, who is scheduled for trial Oct. 13. All of the officers have pleaded not guilty.

During closing arguments, Bledsoe said Gray's death "cannot be blamed on poor judgment or error," and that Rice's intentional actions "put together formed a chain" of events that caused Gray's death.

Rice's attorneys said his actions were reasonable given Gray's combativeness, the volatility of the scene, and the danger associated with seat-belting a detainee in the small space of the van's rear compartment.

"Everything about it was professional, correct," said Michael Belsky, one of Rice's attorneys.

On Monday, Williams noted the contested circumstances in which Rice made his decision not to secure Gray in a seat belt. He said both sides wanted him to view the atmosphere at North Mount and Baker streets in a "vacuum" — the prosecution said the officers were not threatened, the defense said they were — but that he had to view it in context.

Williams quoted individuals heard yelling at the officers on a cellphone video, and said it was clear to him that "emotions and tensions ran high" that day. He said it was "a matter of perspective" as to the threat and the need for officers to leave the scene quickly, and that Rice's perspective was important.

"It is clear that law enforcement and citizens alike were yelling and upset. It is clear that information did not flow efficiently between law enforcement and citizens," Williams said. "While there are different views as to what happened, and a clear disagreement on the number of people at any given time, none of the individuals who testified indicated that it was a quiet time at Mount and Baker while Mr. Gray was being placed into the wagon."

Williams also found that prosecutors had failed to establish Rice's level of training or his awareness of a policy put in place days before Gray's arrest that removed an officer's discretion in deciding whether to secure a detainee in a seat belt — instead requiring it. He noted that part of that failure might have stemmed from his decision to block some evidence of Rice's training based on a discovery violation by the prosecution.

But he said the violation of police general orders is not a crime, and that "failing to seat-belt a detainee in a transport wagon is not inherently criminal conduct."

David Jaros, a University of Baltimore law professor who watched the trial, said prosecutors are "going to have to step back and reassess their evidence" against the officers still facing charges, given Williams' findings.

Douglas Colbert, a University of Maryland law professor who also observed the proceedings, said Williams obviously "wanted more direct evidence" to convict Rice. Still, he praised Mosby for bringing the case, which he saw as "another step in making sure no one else suffers" the same fate as Gray.

"From this point forward," he said, "the police are certainly put on notice that they must provide care and safeguard prisoners."