Spain's prime minister on Sunday apologised to victims for a loophole in a landmark law aimed at fighting sexual violence that has allowed some convicted offenders to reduce their sentences.

The law, dubbed "Only yes means yes", came into effect in October, reforming the criminal code in a bid to define all non-consensual sex as rape.

But since then, at least 104 offenders have been released and another 978 have seen their sentences reduced, according to latest government figures. 

In an interview published on Sunday in the El Correo newspaper, Prime Minister Pedro Sanchez said that "I ask victims for forgiveness for these undesired effects".

"I don't think any deputy, including those parliamentary groups who voted against the 'only yes means yes' law is okay to lower sentences of sexual aggressors," he was quoted as saying. "That's why I am asking for forgiveness." 

Under the law, the lesser charge of sexual abuse was dropped and all violations were grouped as sexual assault, which carried stiffer penalties.

The law simultaneously reduced the minimum and the maximum punishment for certain types of sexual crimes, and hundreds have applied to have their sentences revised.

In Spain, sentences can be modified retroactively if a change in the penal code benefits the convicted.

As a result, many of those convicted have seen their sentences reduced, provoking outrage in the country.

The left-wing government has introduced modifications designed to close the loophole, which parliament is currently examining.

"We will put a solution on the table to resolve these problems," Sanchez said.

Spain is due to hold municipal and regional elections at the end of May and legislative polls at the end of the year.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.