President Raul Castro on Tuesday honored five Cuban intelligence agents who spent years in U.S. prisons, becoming heroes in their homeland and causing friction between the two countries that are now in the process of restoring full diplomatic relations.

The release of the last three of the "Cuban Five" still in prison helped usher in the historic diplomatic breakthrough in December. They were freed in a sweeping deal that included the release by Cuba of American contractor Alan Gross and a Cuban who had spied for the U.S.

"Our first thought is gratitude and loyalty to all those throughout history who with their sacrifice have made it possible for us to live in a socialist, revolutionary and victorious Cuba," said Gerardo Hernandez, one of the five agents who received medals from Castro.

Hernandez, Antonio Guerrero, Ramon Labanino, Rene Gonzalez and Fernando Gonzalez were Cuban intelligence agents whose so-called "Wasp Network" operated in Florida in the 1990s. They were arrested in 1998 and later convicted on charges including conspiracy and failing to register as foreign agents.

Cuba insists they were not acting against U.S. sovereignty, only keeping tabs on militant exile groups that Havana blames for terror attacks on the island, including a string of hotel bombings. However, prosecutors argued they also tried to penetrate military bases, including the U.S. Southern Command and facilities in the Florida Keys.

For years, Havana made them an official cause celebre with their faces gracing billboards across the island.

Two were released earlier and the other three were freed in December.