Jordan's parliament has repealed a provision in its penal code that allowed rapists to escape punishment by marrying their victims.

The move came following pressure by activists and rights groups.

Legislators narrowly voted for a repeal, although some argued victims of rape would be protected from social stigma if they married their abusers.

Following the repeal of the provision, contained in article 308, cheers erupted from the spectators' gallery.

Abu Halaweh, executive manager of human rights group Mizan for Law, said the fact that women need to be protected from social stigma following an abuse indicates "a problem" in how Jordan society perceives women.

"The law still looks at women as bodies, linked with 'honour,'" she said.

Ahead of the vote, activists had gathered outside the parliament to protest against the law. They held banners reading "Article 308 is a disgrace to the Jordanian justice system" and "Article 308 does not protect honour, it protects the culprit."

Similar protest occurred in Lebanon, a Middle Eastern country that still allows rapists to marry their victims.

In December, as well as earlier this year, activists have staged protests calling on parliament to repeal article 522.

Last year, female Lebanese activists dressed as brides took to the streets of the capital Beirut to protest against the law.

The activists, who wore bandages and white wedding dresses stained with fake blood, gathered outside government buildings.

The parliament approved a proposal to scrap the article in February 2017, Lebanon's National News Agency reported.

"The debate around article 308 is part of a regional move toward cancelling provisions that allow impunity for sexual assault," Human Rights Watch said ahead of the vote in Jordan.

In July, Tunisia scrapped a similar provision in its penal code.

A similar move occurred in Morocco in 2-14, when legislators removed a clause from article 475, which allowed "some men to escape prosecution for raping a child if they agreed to marry her", HRW said.

Bahrain's parliament is currently considering a proposed repeal to a similar law, but only in case of a gang rape.

14-year-old rape victim
Legislators narrowly voted for a repeal after some argued victims of rape would be protected from social stigma if they married their abusers - Representational Image Photo by Getty Images