A U.S. federal court has said it will rehear the appeal of five Cubans who were convicted of spying in 2001.

The court's decision to rehear the case cancels a decision issued in August by a panel of judges which said the the five men deserved a new trial.

In August, the three-judge panel said that pretrial publicity was one factor in favor of granting a new trial. Another factor cited was community prejudice in Miami, Florida, where the trial was held, against the current government of Cuba.

On Monday, a federal appeals court said all 12 of its active judges will reconsider the case.

In 2001, the five received sentences ranging from 15 years to life in prison.

All of them admitted to being Cuban agents, but claimed they were gathering information about Cuban exiles, not about the United States.

Some information for this report provided by AP and Reuters.