By Mike Hellgren

BALTIMORE (WJZ) — There were clashes in the courtroom Thursday in the trial of Officer Caesar Goodson Junior. The defense began presenting its case after the judge refused to throw out the charges.

Goodson is facing the most serious charges in the arrest and death of Freddie Gray.

READ MORE: Protests Continued In Maryland Saturday Over A SCOTUS Decision To Overturn Roe V. Wade

The defense may have lost the motion to acquit, but they started their case with a bang — a witness who had a showdown with prosecutors. They ended with a huge wildcard witness.

A clash in the courtroom exposed simmering tensions in the Freddie Gray investigation, as prosecutors accused the lead police detective of sabotaging their case.

“That in and of itself is so rare, it is so unusual,” lawyer and courtroom observer Warren Alperstein told WJZ Investigator Mike Hellgren.

Detective Dawnyell Taylor testified for the defense, admitting she leaked notes to them, showing the assistant medical examiner thought Freddie Gray’s death was a freakish accident, and that he was not killed by human hands, putting the credibility of the homicide ruling in doubt.

Detective Taylor says lead prosecutor Janice Bledsoe threw tantrums when presented with the evidence, and she questioned Bledsoe’s integrity.

READ MORE: Man Found Dead Near His Walker On Anne Arundel County Roadway Saturday, Police Say

“The problem is that allegations that the police were either sabotaging the investigation or that the the prosecutor’s office was committing misconduct and hiding exculpatory information clouds the case,” said David Jaros, University of Maryland School of Law.

The defense also took a risk, calling Donta Allen to the stand — the detainee in the van with Gray. After repeatedly saying he couldn’t remember that day, Allen opened up and said he heard banging, and it sounded like Gray’s head. That benefits the defense timeline.

“When I was in the back of that van, it did not stop or nothing,” Allen said in 2015. “All it did was go straight to the station. But I heard a little banging, that was like, he was banging his head.”

The courtroom drama followed the judge’s major decision to keep all charges against Officer Caesar Goodson intact. He said it was a close-call not to acquit Goodson of murder, grilling prosecutors about a lack of evidence backing their central theory in their case — that Freddie Gray was given a rough ride.

The state only produced a short video of Goodson running a stop sign.

The defense has not yet rested. They will resume at 9:30 a.m. Friday.

MORE NEWS: Man Shot In Joppatowne Saturday, Sheriff's Office Says

Follow @CBSBaltimore on Twitter and like WJZ-TV | CBS Baltimore on Facebook.