BARCELONA - In the dying days of General Francisco Franco's dictatorship, Antoni Ruiz found out for himself what thousands of others had already suffered for being gay.

Ruiz, then just 17, from Valencia, eastern Spain, told his mother he was homosexual and his family sought advice from a nun.

"She went straight to the police and I was arrested and sent for trial," said Ruiz.

"I spent three months in prison. I was raped there and in the police cells and psychologically tortured by both the guards and the prison doctor."

Now, 31 years later, Ruiz and a dwindling band of others who suffered at the hands of Franco's ruthless repression of homosexuals may finally be offered compensation by the state for their ruined lives.

The Spanish Government is to offer money to those who were sent to mental hospitals, tortured, imprisoned or who suffered a lifetime of persecution.

Spanish Justice Minister Juan Fernando Lopez Aguilar is considering granting victims a pension of €800 a month ($1495), plus a one-off payment of €12,000 for what they suffered under the regime. It could be introduced in two months.

Many homosexuals were prevented from working under the Franco dictatorship because of their "criminal" records, meaning they never contributed enough money to receive more than the minimum pension.

Ruiz, now president of the Association of Ex-Social Prisoners, said the move would be a victory.

"This is not just about economic compensation but remembering homosexuals who suffered under unjust and dictatorial laws," he said.

Only a few hundred survivors will see the payments as many of the thousands victimised have since died.

During Franco's dictatorship, gays were jailed or locked up in sinister mental institutions known as "correction camps". With echoes of the Nazi atrocities against gays, they were given electric shocks in the belief this would rid them of their homosexual urges. Inmates were forced to watch pornographic films featuring women in an effort to show them sex life that was deemed "natural" by the conservative authorities.

As part of their National Catholic ideals, the Franco regime and its Falangist supporters considered homosexuals a threat to the "macho" Spanish male.

General Queipo del Llano once said: "Any effeminate or introvert who insults the movement will be killed like a dog."

Homosexuality was considered a criminal offence and condemned under the Law against Delinquency and Criminals introduced in 1954.