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.
Antoni, 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 Mr 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, Mr Ruiz and a dwindling band of others who suffered General Franco's ruthless repression of homosexuals, may finally be offered compensation by the state.
The Spanish government may offer money to those who were sent to mental hospitals, tortured, imprisoned or who suffered a lifetime of persecution. The Spanish Justice Minister, Juan Fernando López Aguilar, is considering granting victims a pension of €800 (£540) a month, plus a one-off €12,000 payment 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.
Mr Ruiz, 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 added. A few hundred survivors will see the payments - many of the thousands victimised have since died.
During Franco's homophobic 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 that this would rid them of their homosexual urges. Inmates were forced to watch pornographic films featuring women in an effort to show them a sex life that was deemed "natural" by the conservative authorities.
As part of their nationalist, Catholic ideals, the Franco regime and its Falangist supporters considered homosexuals a threat to the "macho" Spanish male.
General Queipo del Llano, who broadcast to the nation, once said: "Any effeminate or introvert who insults the movement will be killed like a dog."
The most famous gay man killed by the regime was the poet and playwright Federico Garcia Lorca, who wrote Blood Wedding and The House of Bernarda Alba. Considered a subversive, he was executed by a Nationalist firing squad in Granada in 1936.
Homosexuality was designated as an offence under the "law against delinquency and criminals" introduced in 1954. But towards the end of Franco's regime, it was increasingly viewed as an illness rather than a crime. In 1968, the psychologist Lopez Ibor said: "Homosexuals should be seen more as sick people than as criminals. But the law should still prevent them proselytising in schools, sports clubs and army barracks." Jail terms of up to three years were imposed under laws covering "public scandal" or "social danger".
Homosexuals, almost all of them men, were packed off to mental hospitals, where some were given electric-shock therapy.
Lower middle class or working-class gays without powerful friends in the regime to protect them were the main victims. For others, the situation was different. The historian Pablo Fuentes said: "It is not uncommon to hear homosexuals from the upper classes and the aristocracy speak about the Franco period as a great time."
Many gay people who suffered at the hands of the regime are reluctant to raise the issue because of the horrors it brings back or because they still fear society's attitudes.
Even after Franco died, persecution of gays continued. They could be jailed until 1979. And although thousands of political and other prisoners were pardoned in 1976, gay people were made to serve their sentences. In 2001, Spain finally pledged to wipe clean the criminal records of gays convicted under Franco.
The present Socialist government legalised same-sex weddings and gay adoption in 2005, against opposition from the conservative opposition and the Roman Catholic Church.
Pedro Zerolo, president of Spain's Federation of Gays and Lesbians, said: "What we want is a declaration of moral rehabilitation for those people who had part of their lives stolen by the state."