The motto of the Academy of Science of South Africa is: “Applying scientific thinking in the service of society.” There are many types of scientific thinking, of course, and not all of them serve society particularly well. Scientific thinking on homosexuality, for instance, has a very chequered past.

Until the mid-1970s, the American Psychiatric Association listed homosexuality in its official manual of mental disorders. Academic journals at the time were filled with case reports of psychologists and medics trying to turn gay men straight. A new book, ‘Curing Queers’: Mental Nurses and Their Patients, 1935–74 by Tommy Dickinson, details cases of such ‘aversion therapy’ from the United Kingdom, where behavioural psychologists tried to erase homosexual behaviour by associating it with unpleasant sensations, including pain.

Scientific thinking on homosexuality, and other issues of sex, sexuality and gender, has moved on considerably since then. Thankfully, so too have many societies. Last month, Ireland became the latest country to legalize same-sex marriage. Science played no part in that decision, and why should it have?

Unfortunately, not everyone sees it that way. Science — or, more accurately, a flawed version of scientific thinking — is still used as a cloak for prejudice and persecution of homosexuals in countries across Africa and elsewhere. In February last year, for example, the press office of the Ugandan presidential State House formally announced that President Yoweri Museveni was to sign an “anti-gay bill after experts prove there is no connection between biology and being gay”.

The ‘scientific’ thinking here (and bear with us) is that, because researchers have not found a specific gene that is associated with homosexuality, science cannot say that some people are born gay. And if they are not born that way, the elastic logic goes, homosexuality is a lifestyle choice. And states are within their rights to criminalize some behaviour. “I want a scientific answer,” the president said, “not a political answer.”

As we report on page 135, a scientific answer on this question is now available. The Academy of Science of South Africa has published a comprehensive study on the science of human sexuality and the implications for policy (see go.nature.com/q3rr4k). The report demolishes the political lie that anti-gay laws are supported by scientific evidence. And it shows that, contrary to the public-health claims of politicians who want to criminalize homosexuality, such laws hamper efforts to combat the spread of HIV and other sexually transmitted infections.

The study could find no evidence that homosexuality is anything other than a feature on a spectrum of human sexuality.

What difference will this report make? It would be naive to expect that rational argument — scientific thinking — can draw the poison from the venomous attitudes that drive hatred and prejudice. But the report, if it is distributed widely, can still act as a useful tool for those who have the courage within Africa to oppose unjust laws.

As the report points out, there is precedent here. South Africa under the apartheid regime, and other places, tried to justify laws against mixed-race marriages with references to science and public health. The ‘natural order’ demanded that everyone stick to their own ethnic and racial groups. Countering such claims alone does not dismantle the regime that produces them, but it offers ammunition to under­mine claims to legitimacy that such regimes may make. Science helped to strip away the cloak to reveal the true, ugly motivations for such racial discrimination (and continues to do so, because the argument that ‘mixed’ couples produce more-dysfunctional families than non-mixed ones still rears its head from time to time). And it can do the same for anti-gay rhetoric too.

This is not an easy subject for scientists in Africa to cover. The South African academy deserves great credit for taking on this topic, and for producing such an unvarnished account of the true state of the scientific evidence and what that means for evidence-based policy. Credit, too, should go to the Uganda National Academy of Sciences, which has officially endorsed the findings.

Museveni has the scientific answer he requested. As a phrase used many times in the report reads, the study “could find no evidence that” homosexuality is anything other than a feature on a spectrum of human sexuality. Indeed, the more that scientific thinking is applied to human sex and gender issues, the clearer it becomes that the evidence points towards greater diversity as the norm, not a culturally determined number of select options.

Spread the word. Share the report and its findings. Its conclusions, to those who respect scientific evidence, may be unremarkable. But sometimes stating the obvious again and again until people start to listen can be the best way for scientific thinking to serve society.