SANTA ROSA (CBS SF) – A Santa Rosa man has been sentenced to 20 years in prison after pleading no contest to attempted murder charges following a shooting in 2018.

According to the Sonoma County District Attorney’s Office, a judge sentenced 23-year-old Thomas Alejandro Martinez on Wednesday.

Prosecutors said in March of 2018, Martinez and Miguel Sanchez-Aleman attacked the victim, who was parked at an apartment complex on Corby Avenue. Martinez had been searching for the victim to settle a debt.

Martinez pistol-whipped the victim and shot at him multiple times while he attempted to drive away, according to the DA’s office.

Following the shooting, both Martinez and Sanchez-Aleman fled the scene, while Sanchez-Aleman’s girlfriend jumped out of the getaway car and stashed the gun in a nearby apartment, prosecutors said.

The victim, who suffered a gunshot wound to the abdomen, called for help at a nearby convenience store and received lifesaving medical treatment at a hospital.

Martinez pled no contest earlier this year to charges of attempted murder and admitted sentencing enhancements for using a firearm and inflicting great bodily injury to the victim.

“Those that seek to use firearms in Sonoma County to further their criminal activity should be aware that my office has always, and will continue to aggressively seek lengthy prison sentences for such behavior,” District Attorney Jill Ravitch said in a statement.

Prosecutors said Martinez’s co-conspirators also pleaded no contest and were previously sentenced for their roles in the attack.