Illinois has become the second state in the US to rule out the ‘gay panic’ defence.

As of January 1 2018, Illinois has banned the defence which allowed defendants to blame a victim’s sexual orientation or gender identity as a reasoning behind violent crimes committed against LGBTQ+ people.

It comes as the law banning the defence was signed off by Governor Bruce Rauner in August after the motion wasn’t opposed by anyone in the state House or Senate.

California was the first state to outlaw the defence, and many more states including New Jersey, Massachusetts and Pennsylvania are expected to follow suit this year.

The ‘gay panic’ defence often does not hold up in court and lawyers who have attempted to use it in cases have rarely been successful.

Related: ‘Gay panic’ defence finally debunked by scientific study

However, it is an important move to scrap the defence as critics say it gives people the chance to perpetuate hate crimes.

Monica Harrell, a chairperson for Equal Rights Washington, explained: “It (the defence) is saying you’re surprised that somebody might be different than you, whatever that difference is, and that that would allow you to initiate violence, and in some cases, lethal violence. That should never be a defence.”

D’Arcy Kemnitz, executive director of the National LGBT Bar Association added that the panic defence was an “outdated relic reminiscent of a time when widespread antipathy was commonplace for LGBT individuals”.

Related: Gay panic claim rejected in teenage murder trial

“It asks jurors to find that a victim’s sexual orientation or gender identity excuses the actions of a violent criminal.

“Our nation’s courtrooms cannot truly be places where law rules supreme while these defenses are still allowed to persist,” Kemnitz added.

Brian Johnson, CEO of Equality Illinois, an organisation that worked tirelessly to push the ban through, said that the eradication was important despite the fact that it usually falls through as a defence.

“It makes our identity sufficient reason for murder,” Johnson said. “We never wanted it to be used going forward.”

Anthony Michael Kreis, who drafted the Illinois legislation, added that it was a positive move.

“[The ban] sends an important message to the LGBTQ community that the state will protect them equally and the courts will not be allowed to entertain these types of defenses, which victimize victims again,” he said.