Under the new legislation, consent to sex would be defined in law
A major shake-up of the law on sexual offences, including a toughening up of rape legislation, has been passed by the Scottish Parliament.
The Sexual Offences Bill will define consent to sex in law, creating a broader statutory offence, including male rape, for the first time.
MSPs also moved to close a loophole in the bill, over Labour fears it could create a "get-out clause for rapists".
The laws won wide cross-party backing at the final parliamentary hurdle.
The bill aims to tighten up current laws by giving a broader definition of rape and consent based on free agreement.
It sets out a list of circumstances where there can be no free agreement - including a victim being incapable through alcohol.
Kathleen Caskie of Victim Support Scotland welcomes the definition of consent
The new laws came at a time when women's organisations have branded figures showing only 3% of rape allegations in Scotland end in conviction as a "national disgrace".
Hailing the legislation, Justice Secretary Kenny MacAskill said: "Challenging myths, assumptions and unacceptable attitudes is vital if the legislative reforms and the changes being made to the prosecution of these offences are to be fully effective.
"This is a journey, not simply in terms of legislation, but in terms of Scotland becoming a modern, progressive country, recognising the position of women and treating them with the respect they are entitled to."
Parliament backed an amendment from Labour MSP Margaret Curran, who said the bill as it stood would allow a rapist to claim a victim had given prior consent, for example, before getting drunk.
She said the law had to provide protection to women who were targeted by predatory men, even when they were very drunk.
The legislation also brings in tougher laws on sexually offensive e-mails and texts, and the use of date rape drugs.
The laws were passed by 121 votes to zero, although Green MSP Patrick Harvie abstained.
Labour community safety spokesman Paul Martin said there were "many positive aspects" to the bill, but raised concern it could allow a person convicted of sexually assaulting a child to be fined.
Backing the reforms, Tory justice spokesman Bill Aitken, said: "Sometimes people behave foolishly, sometimes people behave even irresponsibly. But it is our duty to see they are protected."
The Lib Dems' Robert Brown added: "As a whole, it provides what we hope will be a modern statute, fit for purpose in the 21st century, playing its part in deterring crime and securing justice for the victims of serious crimes of a sexual nature."
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.