Ankara (AFP) - The Turkish government on Tuesday withdrew a controversial bill that could overturn men's convictions for child-sex assault, after an angry public backlash that saw thousands take to the streets.

Critics had said the bill -- which would allow the release from jail of sex assault convicts if they marry their victims -- would legitimise rape of minors.

Its withdrawal marked a rare concession to popular opposition by the ruling Justice and Development Party (AKP), which has dominated politics since 2002.

"We are taking this bill in parliament back to the commission in order to allow for the broad consensus the president requested, and to give time for the opposition parties to develop their proposals," Prime Minister Binali Yildirim told a news conference in Istanbul.

"This commission will evaluate and take into account all sides and surely a solution will be found."

With the issue becoming a rallying cause for Turkey's embattled opposition, President Recep Tayyip Erdogan had called for a compromise.

But Justice Minister Bekir Bozdag said later on Tuesday the issue was "now closed" and would only return to the agenda "in the future if political parties can secure a broad consensus".

If the bill had passed, it would have permitted the release from prison of men guilty of assaulting a minor if the act was committed without "force, threat, or any other restriction on consent" and if the aggressor "marries the victim".

Opposition parties from across the political spectrum heavily criticised the bill, which was approved in an initial parliamentary reading on Thursday.

It had been expected to be debated again on Tuesday but thousands from all social backgrounds staged protests in Istanbul and other cities at the weekend.

- 'Paying for mistakes' -

With tensions still high, riot police used tear gas to stop a group of two dozen protesters from marching to parliament in Ankara on Tuesday, an AFP photographer said.

The government emphasised the bill was not being entirely dropped and would be reviewed and amended by parliament's justice committee.

Story continues

Officials have insisted the legislation sought to ease a considerable social problem in a country where child marriage is widespread, especially in the southeast.

Defenders of the bill said it aimed to help families where a girl fell pregnant while she was below the age of consent.

The legal age of consent in Turkey is 18.

Yildirim said the proposals sought to help children in 3,800 families who "are forced to grow up without the love of their father" -- likely imprisoned -- and "paying for the mistakes of their mothers and fathers".

The Turkish statistics office said in April that 5.2 percent of the over 600,000 official marriages in Turkey last year included child brides aged 16 to 17, down from 5.8 percent in 2014.

Family and Social Affairs Minister Fatma Betul Sayan said the bill was to be "reconsidered" taking people's concerns into account, insisting that the government "was absolutely against marriages at an early age".

- 'Victory for women' -

Main opposition Republican People's Party (CHP) leader Kemal Kilicdaroglu hailed Tuesday's move as a "victory for women".

"Today if the AKP has taken a step back, it was thanks to this country's brave women... For the first time, they (the government) realised women's strength," he said.

Gauri van Gulik, Amnesty International's deputy Europe director, told AFP the proposals should be rejected "once and for all".

"The government should help these families with concrete measures rather than disturbingly linking suspending sentences to marriage in any way."

The bill also faced criticism from the pro-government Women's and Democracy Association (KADEM), whose deputy chair is Erdogan's younger daughter Sumeyye Erdogan Bayraktar.

Campaigners have long accused the government of failing to do enough to stamp out child marriage and of paying more attention to pushing up the birth rate.

Erdogan in June urged women to have at least three children and once described birth control as treason.