The bill will widen existing law to cover gay hate crimes
New laws to bring in tougher penalties for hate crimes have been passed unanimously by MSPs.
Under the legislation, crimes motivated by hatred of gay or disabled people will be considered as aggravated offences.
The bill, brought by Green MSP Patrick Harvie, won early ministerial backing.
The Conservatives had expressed initial concern it could create a "two-tier justice system", but voted for the legislation at Holyrood.
As well as cracking down on certain types of hate crime - it also aims to give gay and disabled people the confidence to report it.
Justice Secretary Kenny MacAskill said the move was a small, but significant step in making Scotland "all it can be".
Dr Paul Iganski, who lectures in criminology at Lancaster University, said the added aggravated element to some crimes reflected the greater harm inflicted by the offender.
Norman McBreen from Paisley was stabbed in a homophobic attack
"Clearly, when a person is targeted because of some aspects of their identity, in this case their disability, sexual orientation or transgender identity, evidence shows that it hurts victims more than identical crimes that are carried out for similar reasons," he said.
"Victims suffer particularly psychological or emotional harm and therefore offenders by getting an extra penalty are simply getting their just deserts - the greater the harm, the greater the penalty."
The Offences Aggravated by Prejudice (Scotland) Bill, will have the effect of widening the definition of hate crimes, and bring Scotland into line with the rest of the UK.
Under existing law, crimes motivated by religious or racial hatred are singled out for special treatment.
The Scottish Parliament's justice committee previously said it was, on balance, "appropriate" to create a new group of aggravated offences.
But it warned against any future attempts to widen the legislation further, to include crimes motivated by factors such as age or gender.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.