Updated

Two former Cuban intelligence officers convicted of spying in the U.S. were handed reduced prison sentences Tuesday after an appeals court ruled their original terms were too severe.

U.S. District Judge Joan Lenard accepted an agreement reducing Ramon Labanino's term from life in prison to 30 years behind bars. At a separate hearing hours later, Lenard shaved a little more than a year off Fernando Gonzalez' 19-year sentence.

The 11th U.S. Circuit Court of Appeals earlier this year had vacated sentences for the men, both 46, who were part of the so-called "Cuban Five" spy ring. A third member of the ring had his life sentence replaced earlier this year with a far lesser prison term.

Labanino's attorneys had worked out the new sentence with prosecutors. Assistant U.S. Attorney Caroline Heck Miller said the deal resulted in "a reasonable sentence."

Gonzalez, though, had hoped for a greater reduction than what he got.

"It is important that foreign governments know that such activities are not tolerated in this country," Lenard said.

The five men, who are lionized as heroes in Cuba, were convicted in 2001 of attempting to infiltrate military bases including Key West's Boca Chica Naval Air Station and the Miami-based Southern Command headquarters in the 1990s. Prosecutors said they also kept tabs on Cuban exiles opposed to the communist government of brothers Fidel and Raul Castro and sought to place operatives inside campaigns of anti-Castro politicians in the U.S.

A key goal was getting inside Southern Command to obtain any U.S. plans for an invasion of Cuba, Miller said.

One of the five, whose life sentence still stands, was convicted of murder conspiracy in the 1996 killings of four "Brothers to the Rescue" pilots whose planes were shot down by Cuban MiG fighters over the Florida Straits. The organization dropped pro-democracy leaflets on the island and helped Cuban migrants trying to reach the U.S.

Labanino oversaw many of the Miami-based spy activities for Cuba's Directorate of Intelligence, according to court documents. He also took part in a plot known as "Operation Texaco" involving the theft of dozens of dead infants' identities to concoct fake documents such as passports and drivers licenses for other Cuban operatives.

Lenard initially sentenced Labanino to the maximum life sentence for espionage conspiracy. But the appeals court ruled that was unjustified because no top secret U.S. information were obtained. The same legal reasoning led Lenard in October to reduce the sentence for 50-year-old Antonio Guerrero, who had spied from a job at the Key West Navy base, from life to 22 years.

Gonzalez's 19-year sentence was thrown out because he was wrongly labeled as a supervisor of other spies in the group's attempts to obtain false identification and travel documents. But prosecutors said Gonzalez was a supervisor in other areas, such as the attempt to infiltrate the Southern Command, and had extensive spy training and multiple false identities including the Mexican "Ruben Campa" — a name stolen from a dead child.