BAKERSFIELD, Calif. (KGET) — A man received a 29-year prison term on Wednesday in connection with a deadly shooting outside a taqueria on Union Avenue.

Manuel Madrid, 21, pleaded no contest last month to attempted murder. A charge of first-degree murder was dismissed.

Prosecutors said a plea deal was offered because Madrid, although involved, was not the shooter; that person remained at large.

On the night of March 11, 2021, Madrid and another person approached Juan Manuel Andrade Fernandez Jr., who was confronting people outside a restaurant, police said.

Fernandez, 32, had parked his car in front of the Tacos La Villa on Union Avenue near Alpine Street and tried to enter the restaurant’s dining room, but it was closed. Only the drive-thru was open.

“It appeared to me that (Fernandez) appeared to be intoxicated or under the influence of a narcotic,” an investigator who reviewed the surveillance footage of the incident wrote in court documents. “He was staggering around the parking lot, waving his arms and being confrontational with customers in the parking lot.”

A fight broke out and Fernandez left but returned soon after, documents said. He continued to confront customers until he was shot, the investigator wrote.

Apparently hit several times, Fernandez fell to his knees, according to the documents. One of the shooters then walked up and shot him in the back of the head at close range, documents said.

Madrid was arrested in the area within 30 minutes and a gun was recovered, police said.