A retired general who was convicted and later cleared of aiding one of Mexico's most powerful drug lords was shot and killed Friday in the capital, authorities said.

Former Brig. Gen. Mario Arturo Acosta Chaparro was attacked while at an auto shop in the Anahuac neighborhood and died at a hospital, Mexico City Attorney General Jesus Rodriguez Almeida said.

Witnesses told police that Acosta had just arrived at the auto shop to drop off a car when a lone gunman approached him and shot him three times in the head, Rodriguez said.

The assailant used a 9 mm handgun and got away on a waiting motorcycle driven by an accomplice, the attorney general said.

The former soldier had survived a 2010 attack in the Mexico City neighborhood of La Roma where gunmen shot him in the abdomen.

Acosta was incarcerated in 2000 on charges of protecting Amado Carillo Fuentes, a leader of the Juarez drug cartel who had died three years earlier after botched plastic surgery.

But in 2007 a panel of judges overturned Acosta's drug-trafficking conviction and ordered him released, ruling that prosecutors failed to prove the alleged links to Carillo Fuentes.

In 2002, Acosta was accused of homicide in the disappearance of leftist activists and revolutionaries during the government's "dirty war" against dissent during the 1970s and 1980s. A judge determined Acosta was not responsible for the disappearances and the charges were dismissed.