HAVANA (AFP) – More than 50 Cuban political prisoners awoke to the prospect of freedom on Thursday after a breakthrough deal between the Catholic Church and the communist state which brought international praise.

The biggest prisoner release since President Raul Castro formally took power in 2008 exceeds a bold demand by a hunger-striker near death for some two dozen ill political detainees be freed.

Five of the dissidents were to be freed "in the coming hours" and would travel "shortly" to Spain with their families, Cardinal Jaime Ortega, the archbishop of Havana, announced late Wednesday.

The remaining 47 will be freed within the next three to four months, a statement said.

The 52 were among 75 dissidents rounded up in 2003 and sentenced to jail terms of six to 28 years.

Talks between Ortega and Castro leading up to Wednesday's announcement also involved Spanish Foreign Minister Miguel Angel Moratinos, who said the pending move opens "a new era."

"We are quite satisfied. A new era is opening in Cuba, with the will to settle once and for all the political prisoner issue," he said.

Later, he told reporters that "the Spanish government has accepted the proposal that all those who are released travel to Spain, if they so wish."

Moratinos said that Castro, during their six-hour meeting, assured him that relatives and the exiles themselves would be able to return to visit Cuba and that the property of dissidents who leave the country would not be confiscated -- measures that would imply a change in Cuban policy.

The Church statement did not identify the political prisoners to be freed, nor did it mention hunger striker Guillermo Farinas, who is said to be near death from his latest months-long hunger strike.

Bishop Arturo Gonzalez visited with the hunger striker and was told Farinas was waiting for the actual release of the five dissidents before he calls off his action, which has caused huge embarrassment to the Castro government.

The head of the Organization of American States, Jose Miguel Insulza, described the announced prisoner releases as "excellent" news and said he hoped it would prompt Farinas to end his strike.

Farinas's deteriorating condition has been reported, unusually, in the official Communist Party newspaper Granma, in what observers say is an attempt to defuse international criticism should he die.

The psychologist and online journalist has been refusing food since February while demanding the release of 25 political prisoners with failing health.

Farinas, 48, said he could end his strike when the five dissidents are freed, having dropped his original demand for all 25 once church mediation was under way.

"I am skeptical. Until our brothers are on the street, we do not trust the authorities," Farinas said by phone from hospital in the central city of Santa Clara.

Other foes of the government voiced surprise.

"I am stunned -- we were expecting 10, 12, maybe 15 to be freed and then maybe in six months some more," said Laura Pollan, a leader of the Ladies in White group of family members of the 75 political prisoners picked up in the 2003 sweep.

"I will believe it when I see all 75 out on the street," she said.

The Cuban Human Rights and National Reconciliation Commission -- an outlawed but tolerated dissident information clearing house -- estimates there are 167 political prisoners in the Caribbean nation of more than 11 million people.

The Church began a dialogue with the government on May 19. As a result of the talks, one prisoner was released and another 12 were transferred to facilities closer to their families.

Moratinos has said if his visit was a success, it would help toward easing the European Union's common position on Cuba, which has, since 1996, conditioned relations between the EU and Havana on progress in human rights here.

He also said he hoped the United States, Cuba's longtime foe in the region, would "take note" of Havana's decision to free dissidents.

EU foreign affairs chief Catherine Ashton "welcomes" the announcement and "looks forward to the rapid implementation of this decision", an EU statement said.

"The EU is following with great attention the dialogue on human rights issues between the Catholic Church and the Cuban government and hopes this dialogue will lead to a lasting solution allowing the release of all political prisoners," the statement added.