A law to combat violence against women in Morocco entered into force on Wednesday, following years of heated debate and after thousands called for action in a recent gang-rape case.

For the first time, women in Morocco have legal protection from "acts considered forms of harassment, aggression, sexual exploitation or ill treatment".

The new law also paves the way for victims of violence to be offered support.

Families minister Bassima Hakkaoui hailed the legislation as "one of the most important texts strengthening the national legal arsenal in the area of equality of the sexes," in an interview with the official MAP agency.

The text was first drafted five years ago and was adopted by parliament in February, but advocates say it fails to give police, prosecutors and judges guidance on how to handle sexual violence cases.

'They raped and tortured me': How girl's ordeal sent shockwaves through Morocco Read More »

Former women's minister Nouzha Skalli argued that it fails to take into account "international definitions" of violence against women.

She has highlighted the example of marital rape, which is not criminalised under the new legislation.

Sexual harassment is common in Morocco in spite of a new constitution adopted in 2011 that enshrines gender equality.

More than 40 percent of women said they had been "victims of an act of violence at least once," in a survey carried out by Morocco's High Commission for Planning, which surveyed those living in towns and aged between 18 and 64.

Morocco’s rate of reported rapes increased to 1,600 cases in 2017 from 800 in 2016, according to an annual report issued by the attorney general, Morocco World News reported.

The first woman to benefit from the legal change may be a 24-year-old who on Tuesday filed a complaint against three men for harassment, according to Moroccan media.

As authorities begin enforcing the law, a dozen suspects are being held over the alleged gang-rape of a teenage girl.

In a video posted online last month, 17-year-old Khadija Okkarou said she had been kidnapped, raped and tortured by a gang over a period of two months.

Okkarou's testimony triggered a petition signed by thousands of people urging King Mohammed VI to provide her with medical and psychological care.

The next hearing in the case is set for 10 October.