SAN BERNARDINO (   —   Three men charged with trying to kill two San Bernardino police officers during an August 2014 shootout, pleaded guilty Friday in San Bernardino Superior Court.

Jonathan Contreras, 20, Orlando Cruz, 24, and Gonzalo Medina, 22, all of San Bernardino, pleaded guilty to one count of assault with an assault weapon on a peace officer and an allegation of furnishing a firearm.

READ MORE: Día De Los Muertos Celebrations and Others Return To LA

After accepting their pleas, Judge David Mazurek sentenced each defendant to 15 years each in state prison.

During the shootout, Officer Gabriel Garcia was shot in the head and critically wounded. His training partner, Officer Marcus Pesquera, shot and killed suspect 38-year-old Alex Alvarado.

Garcia continues to recover and was released from a rehab facility earlier this year. On Thursday, it was announced Pesquera was going to receive the governor’s prestigious Medal of Valor in a private ceremony next month. He is the first-ever San Bernardino officer honored with the medal.

READ MORE: Sigma Nu Fraternity At USC Suspends Member At Center Of Sexual Assault Allegations

(credit: Tom Wait/CBS2)

(credit: Tom Wait/CBS2)

“If you aid and abet or conspire with another person to shoot a police officer, or any other person, you will be held accountable-even if you don’t pull the trigger,” District Attorney Mike Ramos said. “While this case may be finished in the courtroom, our thoughts and prayers will continue to be with Officer Garcia whose recovery has been an inspiration to so many, and with his partner, whose bravery we will never forget.”

RELATED STORY: San Bernardino Rookie Office To Be Honored With Governor’s Medal Of Valor

In a statement, San Bernardino Police Chief Jarrod Burguan said he was satisfied with the guilty pleas.

MORE NEWS: USC Places Sigma Nu Fraternity On Interim Suspension After Reports Of 'Possible Drug-Facilitated Sexual Assaults,' Students Protest In Support Of Victims

“August 22, 2014, was a tough day for the San Bernardino Police Department,” Chief Burguan said. “I am very proud of the men and women of the organization that investigated this heinous crime on that day, and I am pleased to see the progress that Officer Garcia has made. I am also happy to see Officer Pesquera receive the recognition that he deserves for his actions that day. I would like to thank DA Ramos and the attorneys from his office that worked on this case. Today is a milestone in that we can continue to move forward knowing that justice has been done.”