The practice, still common in some part of the Arab world, is reinforced by a Moroccan law that allows anyone who abuses a female minor to receive immunity from criminal charges if they marry the girl. In the case of Filali, the judge pushed marriage on her.

Women's rights activist welcomed the move to scrap the law, which was announced by justice minister Mustapha Ramid.

"Changing this article is a good thing but it doesn't meet all of our demands," said Khadija Ryadi, president of the Moroccan Association for Human Rights.

"The penal code has to be totally reformed because it contains many provisions that discriminate against women and doesn't protect women against violence."

She singled out one part of the law that reformers needed to look at again. It distinguishes, she said, between "rape resulting in deflowering and just plain rape". The new legal article, imposes a 10-year penalty for consensual sex following the corruption of a minor but doubles the sentence if the sex results in "deflowering".

Fouzia Assouli, president of the Democratic League for Women's Rights, echoed Ryadi's concerns, explaining that the code only penalises violence against women from a moral standpoint - "not because it is violence".

The Moroccan family code, adopted in 2004, should protect children from marriage. "The right to get married is acquired by men and women from 18 years old who enjoy full mental capacities," reads Article 19 of the code.

However, according to Article 20 of the same law minors can be married if the judge issues a special licence after hearings with the parents.

"The law doesn't recognise certain forms of violence against women, such as conjugal rape, while it still penalises other normal behavior like sex outside marriage between adults," she said.