MCALLEN, Texas (CBSDFW.COM/AP) – A former South Texas police chief and law enforcement officer of nearly two decades was sentenced to 20 years in federal prison for drug trafficking.

A U.S. District Judge sentenced 45-year-old Geovani V. Hernandez on Thursday.

READ MORE: Shooting Leaves 1 Dead, Multiple Injured In Fort Worth

Geovani Hernandez (credit:GeovaniHernandezForSheriff.com)

Hernandez, of McAllen, was convicted of numerous drug charges in March, including attempting to aid and abet possession with intent to distribute.

READ MORE: One And Done: Cowboys 4th Quarter Rally Comes Up Short, Fall To 49ers 23-17

Hernandez was a Progreso police sergeant when federal agents arrested him in 2017. A criminal complaint reveals that Hernandez accepted cash from a federal informant to provide security for a drug cartel associate and a shipment of cocaine.

U.S. District Judge Randy Crane noted before the sentencing that Hernandez, who was briefly the police chief in La Joya, could have reduced his prison time by seven years if he had chosen to plead guilty.

MORE NEWS: 'It Was Really Terrifying' Congregation Beth Israel Members React To Hostage Situation

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)