The Baltimore police officer facing the most serious charges in the death of Freddie Gray has been cleared on all counts, marking the second acquittal of an officer charged in connection with Gray's death.

A third officer's trial ended in a hung jury.

Police van driver Officer Caesar Goodson, 46, was charged with second-degree manslaughter, assault, reckless endangerment and misconduct in office after Gray's death. He elected to be tried by a judge rather than by a jury.

Judge Barry Williams found him not guilty on all seven charges Thursday. In the opinion he read, Williams said the prosecution failed to prove that Goodson drove erratically or intended to harm Gray.

Williams said there was no way for Goodson to know Gray was hurt.

Goodson hugged his defense lawyers after his acquittal.

Gray, 25, suffered a catastrophic spinal injury when officers bound his hands and feet but left him otherwise unrestrained inside the metal compartment of a police van. The city erupted in riots and unrest after his death.

News4’s Chris Gordon was in the courtroom in Baltimore when the judge found officer Ceasar Goodson not guilty of all seven charges.

While Baltimore officers' general orders require them to place seat belts on arrestees, Williams said, officers can choose not to if they believe their own safety would be endangered.

Dozens of demonstrators who waited outside the courthouse quietly expressed their frustration and anger after the verdict.

Tawanda Jones, who leads a weekly protest in Baltimore over the death of her own brother during his arrest, cried as she said: "We need to dismantle this corrupt system.''

"I'm sick of it," another woman outside the courtroom said. "We are human beings. We deserve the right to walk in our communities. Who the hell are they serving, and who the hell are they protecting?"

State Sen. Catherine Pugh, a Democratic nominee in Baltimore's mayoral race, urged residents to be patient in the wake of the verdict.

"Protests are a vital part of democracy, but to destroy the homes and businesses many people have worked very hard to build is unacceptable...It is important to respect each other and to respect our neighborhoods," Pugh said.

The Baltimore Police Department canceled scheduled leave for officers, and members of Maryland's National Guard are on standby.

The office of Republican Gov. Larry Hogan also released a statement after Goodson's acquittal.

"Governor Hogan continues to respect the legal process, as well as the court’s decision. Over the past year, the people of Baltimore City have made tremendous progress in rebuilding their communities and businesses," the statement said.

About a dozen demonstrators marched from the courthouse to Baltimore's Inner Harbor. They carried signs that said "Stop racism now.''

Goodson's non-jury trial went to Williams after more than five days of testimony. Prosecutors said Goodson was criminally negligent when he failed to buckle Gray into a seat belt or call for a medic when Gray indicated he wanted to go to a hospital.

At first, they alleged he gave Gray a "rough ride," driving erratically to "bounce Gray around" in the back of the van when Gray's leg shackles and handcuffs left him unable to steady himself.

But Goodson's refusal to talk with investigators or testify at trial left prosecutors with slim evidence of the intent to harm needed to sustain a murder verdict.

"It was very clear that the state's failure to prove a rough ride occurred was a significant blow to their case," legal analyst Warren Alperstein said.

Prosecutors abandoned the "rough ride" theory after a video showing Goodson rolling through a stop sign and making a wide turn before stopping to check on his prisoner failed to create the desired impact.

Goodson's defense attorney said the officer didn't buckle him in because Gray showed "violent and erratic behavior'' during and after his arrest. Witnesses testified that Gray was screaming, flailing around and kicking the wagon doors with such force that the van shook.

Defense attorney Matthew Fraling also said Goodson didn't call for a medic because Gray didn't exhibit any signs of injury or distress, and was believed to only have asked to go to a hospital to avoid going to jail.

Goodson's defense said Gray must have suffered his fatal injury after Goodson last checked on him before arriving unresponsive at the station house.

This is the third trial in the sweeping case against six officers that State's Attorney Marilyn Mosby announced in the wake of protests and rioting in Baltimore's inner city. The violence ended the police commissioner's career and aborted the mayor's political future.

The first two trials also ended without convictions: Officer Edward Nero was acquitted of misdemeanors by the same judge. The only officer so far to choose a jury trial, William Porter, will be retried in September after the jury failed to agree on his fate.

Legal experts disagree about whether the officers still facing charges should be put on trial or not. After three trials and no convictions, it's increasingly clear that the evidence against the officers is too weak to sustain the hopes of citizens desperate for reform.

"If they could not get a conviction on anything in this case, yes, there ought to be some reassessment as to whether they go forward in the others, which are weaker cases," legal analyst Warren Brown said.