A Mexican court has ordered the release of infamous drug lord Rafael Caro Quintero after 28 years in prison.

The court has overturned Caro Quintero's 40-year sentence for the 1985 kidnapping and killing of U.S. Drug Enforcement Administration agent Enrique Camarena. It ruled he was improperly tried in a federal court for the killing, when it should have been treated as a state offense.

A court official who was not authorized to speak on the record said Friday that the Caro Quintero would be released because he had already served his time on other charges.

The 61-year-old Caro Quintero is considered the grandfather of Mexican drug trafficking.