AUSTIN (KXAN) — A 24-year-old man was sentenced July 25 in connection with a shooting that injured an Austin police officer on April 9, 2021.

According to Travis County court documents, 24-year-old Gregorio Sarmiento pleaded guilty July 18 to aggravated assault of a public servant, a first-degree felony. Sarmiento previously faced a charge of attempted capital murder of a peace officer, according to court records.

As a part of the plea, Sarmiento negotiated a 30-year cap for the sentence, according to court documents. Documents showed Sarmiento was sentenced to 20 years in state prison, with a jail credit of 838 days toward his sentence.