Jordan's parliament on Tuesday scrapped a controversial article in the country's penal code that allowed a rapist to escape punishment if he married his victim.
Activists had campaigned for years to abolish Article 308, which allowed rape charges to be dropped if the rapist married his victim and did not divorce her for at least three years.
The article was scrapped as parliament passed amendments to the penal law, the official Petra news agency reported.
Jordanian parliamentarian Wafa Bani Mustafa, who has campaigned to end the law, said last week that parents often agreed to such marriages to minimise "family shame," but she said no girl should be "presented as a gift" to her rapist.
Speaking in parliament on Tuesday, Prime Minister Hani Mulqi threw his weight behind the move.
"The government is committed to eliminating Article 308 to reinforce the protection of the Jordanian family," he said.
Human rights activists applauded parliament's action.
"The removal of this article is a victory for all victims of rape," said Eva Abu Halaweh, a lawyer and the head of law group Mizan.
It comes "after years of huge effort from civil society organisations", she said.
Sarah Leah Whitson, Middle East director at New York-based Human Rights Watch, also welcomed the vote.
"BRAVO #JORDAN for repealing heinous article 308 absolving rapists who marry their victims. Urge #Arab states to follow. Women NOT property," she tweeted.
Whitson earlier urged lawmakers to repeal the article, saying it had been "a blight on Jordan's human rights record for decades."
"The mere existence of article 308 puts pressure on women and girls to marry those who assault them, including teenage victims of rape," she said.
Campaigners have said such laws condemn girls to a lifetime of sexual violence and domestic abuse at the hands of their rapist.
Jordan registered more than 160 rape cases last year, according to official figures.
Campaigns continue elsewhere
Last week, Tunisia also scrapped an article allowing rapists to escape punishment by marrying their victim when it passed a new law to end violence against women.
Rights groups said they hoped Lebanon, which is discussing amending or abolishing a similar provision, would follow Jordan's lead.
"Hopefully this will encourage parliamentarians in Lebanon to revoke it without any exceptions," said Suad Abu Dayyeh, Middle East consultant for Equality Now, a global legal advocacy organisation.
In Lebanon, rights group Abaad has campaigned against the law with billboards of women in bloodied and torn wedding gowns. The caption reads: "A white dress doesn't cover up rape."
In April campaigners hung white wedding dresses from nooses on Beirut's seafront.
Some countries in the region have already closed similar loopholes. Egypt repealed its law in 1999, and Morocco overhauled its law in 2014 following the suicide of a 16-year-old girl and the attempted suicide of a 15 year old who were forced to marry their rapists.
According to Human Rights Watch, countries in the region that retain similar provisions in their laws include Lebanon, Bahrain, Algeria, Iraq, Kuwait, Libya and Syria, as well as the Palestinian territories.
Such laws also exist in several countries outside the Middle East including the Philippines and Tajikistan, according to Equality Now.