The best-known case of the gay panic defence was in the murder of US student Matthew Shepard

The ‘gay panic defence’ – a controversial theory that heterosexual men will naturally react with panic and rage after witnessing homosexual behaviour – has finally been debunked by a new scientific study.

‘Gay panic’ is still a partial legal defence to violence in many US states, although the state of Illinois recently outlawed its use.

The defence means that assailants who attack gay men after seeing homosexual behaviour may argue in court that they could not reasonably control their actions.

It relies on a largely discredited medical idea that many men will have a natural, biological response of rage when witnessing gay behaviour, which will make their actions uncontrollable.

Now, a study published in the Psychology and Sexuality journal shows the theory to be false.

The study showed a series of images – several of which included men having sex – to 120 men, and tested their saliva before and after for alpha-amylase, a chemical that is produced in saliva when a person is stressed.

The study showed that the level of alpha-amylase was the same for those participants who were shown to be tolerant of gay relationships and those who were not.

The study, written by Breanna O’Handley and Karen Blair, concluded that there is “no empirical evidence” to support the gay panic defence.

The researchers said they want to “add to the chorus of those calling for the global banning of the gay panic defence … and to set clear … than an LGBT person’s mere existence is never provocation for physical violence.”

One famous attempt to use the gay panic defence in court involved 15-year-old California schoolboy Larry King, who was murdered by his 14-year-old classmate in 2014.

Lawyers argued in court that the killer, Brandon McInerney, was reacting to King asking him on a Valentine’s Day date.

The case resulted in a hung jury, with McInerney eventually agreeing to a plea deal for a lesser charge.

Last week, the Illinois state legislature decided that ‘gay panic’ and ‘trans panic’ are no longer legitimate legal defences, following in the wake of California – the only other US state to ban the defence.

The most famous use of ‘gay panic’ in court was during the Matthew Shepard murder trial in 1999.

Shepard’s killers, who had beaten and tortured the 21-year-old, argued that they had been enraged by alleged sexual advances from Shepard.

The defence was not accepted by the Wisconsin jury, however, and the killers were sentenced to life in prison.