While apartment-hunting with his partner 30 years ago, Thierry Delessert was repeatedly asked whether they were cousins, or gay. He knew the latter answer would automatically see their application thrown out.

The 56-year-old historian still recalls his run-ins with "suspicious" real estate agents in Switzerland, where police in some places were still keeping registers of homosexuals.

Three decades later, in a referendum on Sunday, the wealthy Alpine nation looks set to allow same-sex couples to marry, and grant them the same rights as their heterosexual counterparts.

"It is a huge step forward," said Delessert, an expert on the history of homosexuality in Switzerland at Lausanne University.

The country decriminalised homosexuality in 1942, but numerous local and regional police forces continued to keep "gay registers", some into the early 1990s.

Switzerland holds a referendum on Sunday and looks set to allow same-sex couples to marry and grant them the same rights as their heterosexual counterparts
Switzerland holds a referendum on Sunday and looks set to allow same-sex couples to marry and grant them the same rights as their heterosexual counterparts AFP / Fabrice COFFRINI

These registers were aimed at "controlling deviance and morality", Delessert explained, adding that they had dire impacts on the lives of those listed.

"If a supposed homosexual was convicted of theft, his homosexuality was submitted as additional proof of his immorality," he said.

"If a homosexual applied to rent an apartment, he would not get it. If a homosexual wanted a job in the public sector, he would not get it."

But the causes of the discrimination remained unsaid: the registers were never made public, and those listed there were never informed.

The Swiss parliament voted to legalise same-sex marriage last year
The Swiss parliament voted to legalise same-sex marriage last year AFP / Fabrice COFFRINI

Only Zurich and Basel publicly announced that they were scrapping the registers, in 1979 and 1980, Delessert said, voicing frustration that all the other registers had simply vanished.

He said he had managed to find handwritten notes on police documents where officers requested the creation of "files" on homosexuals arrested after committing an offence.

Delessert said he had also found testimony from a commissioner mentioning that around 200 homosexuals were registered in Zurich each year.

Zurich's official records division told AFP that these registers had been kept for internal police use, and had been destroyed.

An account by a whistleblower published in the Swiss media in April 1990 first alerted the public to the existence of one of these registers, in Bern, with the outcry pushing authorities to halt the practice.

Thierry Delessert still recalls his run-ins with "suspicious" real estate agents in Switzerland, where police in some places were still keeping registers of homosexuals
Thierry Delessert still recalls his run-ins with "suspicious" real estate agents in Switzerland, where police in some places were still keeping registers of homosexuals AFP / Fabrice COFFRINI

When contacted by AFP, Bern cantonal police said they had searched internally, but "were unable to find information about this register, which apparently existed."

"At an ethical level, it is difficult to comprehend today."

While such statements are welcome, Delessert highlighted that "the political authorities have never apologised" for the practice.

But he hailed the political turnaround in recent years.

A referendum early last year opted to criminalise acts of homophobia, and towards the end of the year, parliament voted to legalise same-sex marriage.

That law aimed to finally bring Switzerland in line with much of Europe on gay rights.

But opponents of the law demanded a referendum within the country's direct democratic system, in a bid to block it.

Recent polls however show that a large majority of Swiss voters back changing the law.

Same-sex couples can already register a civil partnership in Switzerland, but that status does not provide the same rights as marriage.

Allowing same-sex marriage would fix that, enabling foreign spouses in same-sex relationships to apply for citizenship through a simplified procedure, and allowing same-sex couples to jointly adopt children.

And it would controversially give lesbian couples access to sperm donation.

The opponents, mainly drawn from the populist right-wing Swiss People's Party, have plastered Swiss cities with stark posters decrying the commodification of children and warning the law will "kill the father".

One of their posters shows a crying baby with its ear tagged like cattle, and the question: "Babies on demand?"

Another featuring a huge zombie-like head, meant to represent a dead father, was covered over by a nearby primary school in Wallis canton out of fear it would frighten the children.