CONTROVERSIAL hate crime legislation has passed its final hurdle in Holyrood despite concerns over freedom of speech.

MSPs passed the Hate Crime and Public Order (Scotland) Bill by 82 votes to 32, with four abstentions. 

It brings to an end one of the most heated and contentious Bill processes in the history of the Scottish Parliament.

Justice Secretary Humza Yousaf had earlier sought to allay fears following a marathon debate in Holyrood and multiple amendments.

He said those simply stating a belief – such as that an adult man cannot become a woman or that gay relationships are sinful – would not fall foul of the new law.

Critics also raised concerns that the legislation excludes women because it does not cover attacks based on a victim's sex.

The legislation creates a criminal offence of stirring up hatred against protected groups, expanding on a similar offence based on race that has been on the statute books for decades, as well as consolidating a number of different pieces of hate crime legislation.

Speaking in Holyrood, Mr Yousaf said: "To those who think they may accidentally somehow fall foul of the law... because they believe sex is immutable, or they believe an adult man cannot become a female or they campaign for the rights of Palestinians... or those that proselytise that same-sex relationships are sinful, none of these people would fall foul of the stirring up of hatred offence for solely stating their belief – even if they did so in a robust manner.

"Why? Because solely stating any belief, which I accept may be offensive to some, is not breaching the criminal threshold."

Mr Yousaf was forced to make a number of changes to the Bill during its passage through Holyrood.

He said: "The safeguards of the Bill are so, so important to recognise – and there are really strong safeguards in this Bill."

The final Bill mandates that there must be intent in the stirring up of hatred and it must pass a reasonable person's test before an offence has been committed.

Amendments brought by both Mr Yousaf and Justice Committee convener Adam Tomkins on Wednesday sought to further strengthen the Bill's protections for freedom of speech.

But Mr Tomkins's Conservative colleague Liam Kerr, the party's justice spokesman, said the legislation is still "fundamentally flawed".

He said: "The Scottish Conservatives strongly opposed the attacks on freedom of speech throughout the SNP’s Hate Crime Bill.

"Under pressure, Humza Yousaf did U-turn but he has never accepted how badly the SNP got this wrong. The Bill is still riddled with glaring flaws.   

"We voted against the SNP’s Hate Crime Bill because it is a danger to freedom of speech. Criminalising what people say in their own home is too extreme.

"We agree that hate crime should be rooted out but the SNP should not have allowed a fundamental right to be trampled on in the process."

Labour MSP Neil Bibby said the Bill is needed "because hate crime has become more widespread, society has become more polarised and divided". 

He said: "All of us can see how raw and unpleasant some aspects of political debate have become and how easily hate can rear its head."

Mr Bibby said it was "deeply regrettable" that the legislation would not cover attacks based on the victim's sex, saying it is "clear that women are subjected to hate because of their sex".

He said this must be addressed as soon as possible, and that Labour would follow "closely" the efforts of a working group set up by ministers to consider this.

Liberal Democrat Liam McArthur said his party would support the Bill after changes were made to the original proposals.