Follow CBSMIAMI.COM: Facebook | Twitter

MIAMI (CBSMiami) – Last year the Palmetto Expressway was shut down for hours while police investigated a shooting.

They marked countless bullet casings and more while commuters were stuck waiting.

The man wanted in that case was in a Miami-Dade courtroom on Thursday.

Horvin Ruiz kept his head down as Miami-Dade Circuit Court Judge Stacy Glick explained a plea agreement that will put him behind bars for 18 years.

Ruiz, 36, accepted responsibility for a shooting spree on the Palmetto near Northwest 74th Street on Memorial Day in 2017.

Ruiz was driving a red Toyota Corolla when he lost control of the vehicle.

At one point, he drove the wrong way on the highway, finally crashing into a concrete barrier.

Police say Ruiz got out of the car and opened fire with an AK-47 and a pistol, firing 108 rounds at passing cars and getting into a gunfight with several police officers.  In all, 11 people were hurt.

Shortly after the shooting, Ruiz’s sister said he was suffering from mental health issues.

“I say he was trying to get killed,” said Ruth Garcia. “He is sick and has serious mental problems.”

Police discovered a small arsenal of weapons at Ruiz’s home including a shotgun, AK-47 and several handguns.

He was charged with 16 counts of attempted first degree murder.

Five of the officers Ruiz fired at were in court as the judge went over the plea agreement.

Ruiz was sentenced to 18 years in prison with a ten-year minimum mandatory followed by ten years of probation.

“It’s always a tough situation when someone has mental health issues dating back his entire life,” said defense attorney Josh Howard. “My client admitted himself to a mental hospital one week before this incident. There is something to be said for that.”

Howard fears Ruiz will not get the mental health treatment he needs.

Once Ruiz is released from state prison, part of his probation will be that he cannot own any guns and must undergo a mental health evaluation.

All the victims, including the police officers, agreed to the terms of the plea agreement.

Eliott Rodriguez