Updated

A Mexican judge on Thursday ordered the release of five high-ranking army officials accused of aiding a drug cartel after federal prosecutors dropped organized crime charges against them citing a lack of evidence.

It's the latest drug trafficking case against military officers started during former President Felipe Calderon's administration to fall apart.

Judge Raul Valerio Ramirez said he ordered the immediate release of Gen. Roberto Dawe, Gen. Ricardo Escorcia, Gen. Ruben Perez, Lt. Col Silvio Hernandez and Maj. Ivan Reyna from a maximum security prison in Mexico state where they have been held since their arrest last year. The officers were charged with protecting members of the Beltran Leyva cartel.

Federal anti-drug prosecutor Rodrigo Archundia Barrientos dropped charges in the case after concluding that witness testimony was not enough to sustain the case, Valerio Ramirez said in a statement.

In April, a judge ordered the release of retired Gen. Tomas Angeles Dauahare, who was also held in the Altiplano maximum security prison near Mexico City. Angeles Dauahare was also accused of links to the Beltran Leyva cartel.

Angeles Dauahare, who was assistant defense secretary from 2006 to 2008, and the five army officials released Thursday were all arrested based on the testimony of two drug informants.

The two witnesses in the cases were Sergio Villarreal Barragan, who was part of the leadership of the Beltran Leyva cartel, and another man who hasn't been identified but who was the key accuser in the case against former drug czar Noe Ramirez Mandujano. Ramirez Mandujano was also released in April after a judge determined the witness had given false testimony and prosecutors had likely fabricated evidence.

Charged in the same case is U.S.-born drug trafficker Edgar Valdes Villarreal, alias "La Barbie," who worked for the Beltran Leyva cartel until the gang begun to break up with the death of leader Arturo Beltran Leyva in a 2009 shootout with marines. The cartel was one of the main targets of the Calderon administration and several of its leaders were arrested or killed.

Angeles Dauahare was the highest-ranking army official arrested for alleged links to drug traffickers since three-star-Gen. Jesus Gutierrez Rebollo was detained in 1997. Gutierrez Rebollo, then head of Mexico's anti-drug agency, was later convicted and sentenced to 71 years in prison for protecting the Juarez cartel.

Some security analysts said the case against Angeles Dauahare could have been political revenge for his open criticism of Calderon's military crackdown on drug traffickers and because he took part in an event organized by the opposition Institutional Revolutionary Party, or PRI, amid a presidential campaign. Mexican media speculated at the time that then PRI candidate Enrique Pena Nieto was considering him as a possible candidate to head the Defense Department if he won the presidency.