The bill aims to clarify the complex laws surrounding sexual offences
Plans to toughen laws on rape, consent, spiking drinks and offensive e-mails and texts have been unveiled as part of an overhaul of sex crime legislation.
Under the Scottish Government bill, consent would be defined in law, creating a broader statutory offence which includes male rape.
There would also be new offences for sexually offensive e-mails and texts and spiking people's drinks.
But sex between consenting 13 to 15-year-olds would remain a crime.
Introducing the Sexual Offences (Scotland) Bill, based on proposals from the Scottish Law Commission, Justice Secretary Kenny MacAskill said it represented a chance to clarify and strengthen the law on rape and sexual offences.
As well as a broader definition of rape, the bill creates a range of statutory sexual offences and a definition of consent based on "free agreement", with illustrative scenarios.
One of these scenarios would be where a victim was incapable through alcohol or other substances.
Another factor which makes the new definition of rape broader than the old one is the issue of "reasonable" consent.
At present, an accused person must merely have an "honest or genuine" belief that a victim consented, said the policy document. In future, however, that belief must also be a "reasonable" belief.
It also includes "protective offences" against coercive sexual conduct and will continue to treat sexual intercourse with, or between, under-16s as unlawful.
Mr MacAskill said: "There is widespread agreement that the existing law is unclear and derives from a time with very different attitudes from today.
"This is a once in a generation opportunity for parliament to review, reform and clarify the complex mix of common law and statute with a clear legal framework that more accurately reflects the values of modern society.
"Of course, reform of rape law will not, on its own, improve low conviction rates.
"Other ongoing work is vital - improving investigation and prosecution of rape and sexual assault, reviewing law of evidence and challenging public attitudes to rape and sexual assault."
The secretary said the proposal to decriminalise sex between 13 and 15-year-olds were rejected to make clear that society does not encourage sex between children.
Scotland's chief police officers welcomed the proposals to clarify the sex crime laws.
Family protection spokesman for the Association of Chief Police Officers in Scotland (Acpos) Deputy Chief Constable Tom Halpin said: "We particularly welcome reform in addressing previous disparity in terms of gender-specific sexual offences, such as rape.
"The proposal to bring the law up-to-date in this area, giving equal status to men and women, boys and girls, as well as clarity to issues around consent, is a positive amendment to existing legislative provision."
Labour justice spokeswoman Pauline McNeill said there was merit in many of the proposals.
Ms McNeill added: "I would like to seek assurances that the change in the rape laws from a common law offence to a statutory offence will not mean that rape cases are not prosecuted in the High Court. Every rape case should be prosecuted in the High Court."
The government indicated this would remain the case.
The Liberal Democrats welcomed the proposals but called for a radical change in the way society views and supports victims.
Community safety spokesman Mike Pringle said: "Statistics show that one in four people think that women are asking to be raped or assaulted if they have drunk too much or wear revealing clothing. Those attitudes need to be challenged."
Tory justice spokesman Bill Aitken said it had to be recognised that in many cases for juries there was the possibility of evidential difficulties with regard to the definition of consent, but that the bill was a way forward.
The review was prompted after a number of high-profile court cases in 2004.
One of these involved German tourist Bayram Cinci, who was alleged to have forced a Swedish backpacker to have sex with him in a shower at a hostel in Oban.
Cinci, who had denied rape, was jailed for five years in 2002 but was freed on appeal when judges decided there was insufficient evidence to prove that the woman did not consent to having sex.
It also follows claims that as few as one in eight victims actually report sex attacks, while figures last week revealed that there was only a conviction in 2.9% of reported rapes.