Spain's Congress has approved legislation that seeks to make it easier for victims of sexual violence to prosecute their attackers by emphasising the importance of consent.
The initiative was driven by the legal and social fallout from a notorious gang-rape case six years ago.
The Guarantee of Sexual Freedom law, also known as the "only yes means yes" law, was approved by a clear margin.
It must now be approved by the Senate before coming into effect.
"Sexual freedom will finally be a right in our country," said Irene Montero, Spain's minister for equality, who was instrumental in creating the new law.
"We're going to swap violence for freedom and we're going to swap fear for desire. From today, Spain is a freer, safer country for all women."
The reform means that victims will no longer have to prove that they suffered violence or intimidation, or that they physically resisted, in order to show that they have suffered a sexual assault. Any sexual act without consent will be liable to be deemed assault.
"It will only be understood that there is consent when… the will of the person is clearly expressed," reads the text of the bill.
Paralysed by fear
This change, introduced by the leftist coalition government of Pedro Sánchez, has been largely prompted by the so-called Manada or "wolf-pack" case, when five men raped an 18-year-old woman in Pamplona during the city's renowned Running of the Bulls festival in 2016.
The men were all found guilty of sexual abuse, for which they were given nine-year jail sentences, but the court cleared them of rape on the grounds that neither violence nor intimidation had been used.
The issue of consent was key to the case. While the defendants' legal team insisted that the victim never said "no" during the encounter, she described being paralysed by fear.
There was a huge social backlash against the verdict, with massive street demonstrations and some politicians speaking out against it. In 2019, the Supreme Court overturned the ruling, finding the five defendants guilty of rape and increasing their sentences to 15 years.
A total of 2,143 rapes were reported in Spain in 2021, 14% more than the previous year and the highest figure on record.
Seven other European countries have introduced consent-based rape legislation since 2018, according to Amnesty International: Denmark, Croatia, Greece, Malta, Sweden, Iceland and Slovenia.
However, the far-right Vox party, which along with the conservative Popular Party (PP) opposed the new law, said it was unworkable.
"When you force the system to believe a woman without proof, it creates a very dangerous weapon which any woman can use to take revenge on or destroy the life of an innocent person with lies," said Vox deputy Carla Toscano.
"In many cases it is impossible for a man to prove consent", she added.
Prostitution and pornography
The new law will also seek to provide greater support for victims of sexual assault.
The definition of sexual violence is also broadened, including for example harassment in a public place in which a person is humiliated by unwanted "sexual or sexist expressions, behaviours or propositions".
It also bans advertising that reinforces gender stereotyping or which is seen to promote prostitution. The text of the legislation says the aim is to "disincentivise the demand for all kinds of services linked to sexual exploitation, prostitution and pornography which normalises sexual violence".
The law also calls for young sex offenders to undergo education programmes on sexual behaviour and equality.
A series of recent sexual assaults by minors has raised concerns and five teenage boys were arrested in connection with the alleged rape of two girls, reportedly in their early teens, in Burjassot, Valencia, earlier this month.