Jordan appears set to repeal a legislative loophole that allows rapists to escape punishment by marrying their victims.

The Jordanian cabinet recommended removing Article 308 from the country’s penal code on Sunday. The archaic provision guarantees that sexual predators can avoid prison time if they wed their victims and stay married for at least five years. Final approval from Parliament and King Abdullah II is all but guaranteed, according to Suad Abu-Dayyeh, Middle East and North Africa consultant for human rights organization Equality Now.

Abu-Dayyeh called the repeal movement a “collective effort” and praised women’s advocacy groups and parliamentarians for years of activism.

“People have really started to understand the negative impact this article has on women and girls,” Abu-Dayyeh told The Huffington Post on Monday. “Having this law in the penal code is a really big problem.”

Jordan’s lawmakers amended the law last year to restrict its application to rapists if their victims were aged 15 to 18, and if the assault was deemed “consensual.” But mounting public backlash prompted Jordan’s royal committee to recommend abandoning the law completely in February.

Muhammad Hamed / Reuters Jordan's Parliament and King Abdullah II are expected to approve the cabinet's recommendation to repeal Article 308.

Supporters of Article 308 have claimed it allows victims to maintain their reputation and protects them from honor killings.

This region “can concentrate so much on a woman’s virginity,” Abu-Dayyeh said. “They feel it creates dishonor if a girl or woman is raped. ... But people have to understand that a girl who has been raped is a victim, and she needs the support of her family and also the government.”

Egypt repealed a similar measure in 1999, and Morocco followed in 2014. Still, similar rape laws still exist in other parts of the Middle East and Africa. Abu-Dayyeh said she hopes Jordan’s move to repeal the loophole will inspire other countries, such as Bahrain, to take similar actions.

Lebanese activists protested their country’s version of the rule Saturday by hanging 31 paper wedding dresses from nooses on Beirut’s seaside promenade.

🇱🇧 An installation of wedding dresses by artist Mireille Honein & Abaad NGO at Beirut denouncing the article 522 of penal code. @Patrick_Baz pic.twitter.com/FhRF9cPzd0 — Frédérique Geffard (@fgeffardAFP) April 23, 2017

Jean Oghassabian, Lebanon’s minister for women’s affairs, said the country’s Article 522 is from the “stone age.”

“It’s not acceptable for people to talk about it anymore,” Oghassabian told Agence France-Presse. “How is it reasonable for a woman to be raped and then sold into a prison?”

The Lebanese Parliamentary Administration and Justice Committee approved repealing the law in December. The country’s parliament can make a final decision at any time.

“I really hope that Jordan and Lebanon will be good examples of Arab governments [working] to revoke all remaining discriminatory laws toward women and girls,” Abu-Dayyeh said.

Ali Jarekji / Reuters Three Jordanian women, their faces covered to hide their identity, were raped, assaulted or had relationships outside marriage, and are kept in jail to protect them from "honor killing" by their families. (File: March 1999)