A Mexican court on Friday ordered the release of infamous drug lord Rafael Caro Quintero after his conviction for killing a U.S. Drug Enforcement Administration agent was overturned.

Caro Quintero had spent 28 years in prison for the killing. The decision to toss his conviction marked a low point in U.S.-Mexico relations.

The court threw out Caro Quintero's 40-year sentence for the murder of Enrique Camarena, a former DEA agent who was working undercover in Mexico when he was abducted and tortured, after ruling Caro Quintero was improperly tried in a federal court for a crime that should have been treated as a state offense.

A court official who was not authorized to speak on the record said that 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. He established a powerful cartel based in the northwestern Mexican state of Sinaloa that later split into some of Mexico's largest cartels, including the Sinaloa and Juárez cartels.

Mexico's relations with Washington were damaged when Caro Quintero ordered Camarena kidnapped, tortured and killed, purportedly because he was angry about a raid on a 220-acre (89-hectare) marijuana plantation in central Mexico named "Rancho Bufalo" — Buffalo Ranch — that was seized by Mexican authorities at Camarena's insistence.

The raid netted up to five tons of marijuana and cost Caro Quintero and his colleagues an estimated $8 billion in lost sales.

Camarena was kidnapped on Feb. 7, 1985, in Guadalajara, the capital of Jalisco state and a major drug trafficking center. His body and that of his Mexican pilot, both showing signs of torture, were found a month later, buried in shallow graves.

American officials accused their Mexican counterparts of letting Camarena's killers get away. Caro Quintero was eventually hunted down in Costa Rica.

At one point, U.S. Customs agents almost blocked the U.S. border with Mexico, slowing incoming traffic to a standstill while conducting searches of all Mexicans trying to enter the United States.

Camarena's fellow U.S. Drug Enforcement Administration agents consider him a hero in the war against drug trafficking and the El Paso Intelligence Center, where U.S. federal agencies collect information about Mexican drug barons, is named after him.

Caro Quintero is said to have pioneered links between Colombian cocaine cartels and the Mexican smugglers who transport their drugs into the United States.

The ruling left many wondering why it took 24 years for judges to determine Caro Quintero was tried in the wrong court.

Raul Benitez, a security expert at Mexico's National Autonomous University, said the ruling may portend more such procedural rulings following the January freeing of French citizen Florence Cassez, who was convicted in Mexico for being part of a kidnapping ring.

The Frenchwoman served seven years of a 60-year sentence before Mexico's Supreme Court voted 3-2 to release her in January because of procedural and rights violations during her arrest, including police staging a recreation of her capture for the media.

"What appears to be coming is an avalanche of judicial appeals, with the drug traffickers hiring very good, very expensive lawyers, arguing there were violations of due process," said Benitez. "The government is going to have problems."

Mexican courts and prosecutors have long tolerated illicit evidence such as forced confessions and have frequently based cases on questionable testimony or hearsay. Such practices have been banned by recent judicial reforms, but past cases — including those against high-level drug traffickers — are often rife with such legal violations.

"The government has to be prepared to keep an eye on judges so that they don't fall into the easy argument of due process," Benitez said, "because there may also be judges who are receiving money" to accept such arguments.

Based on reporting by The Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino