Thousands of people, including women and children, protested on Saturday in Istanbul against a controversial bill that would overturn men's convictions for child sex assault if they married their victims.

At least 3000 people took part in the demonstration in the city's Asian side. They clapped and whistled as others shouted anti-government slogans.

"We will not shut up. We will not obey," they shouted.

"Withdraw the bill immediately."

They brandished banners such as "#AKP take your hands off my body”, a reference to the ruling party of President Recep Tayyip Erdogan, which introduced the bill.

The opposition, celebrities, and even an association whose deputy chairman is Mr Erdogan's daughter have expressed alarm over the move.

But the government insists the legislation was aimed at dealing with the widespread custom of child marriages and the criticism was a crude distortion of its aim.

The measures were approved in an initial parliamentary reading on Thursday and will be voted on again in a second debate in the coming days. Critics have said the government is encouraging the rape of minors.

If passed, the law would allow 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".

The legal age of consent in Turkey is 18 but child marriage is widespread, especially in the southeast.

The UN children's fund said Saturday it was "deeply concerned" over the bill

"These abject forms of violence against children are crimes which should be punished as such, and in all cases the best interest of the child should prevail," spokesman Christophe Boulierac told AFP.

The latest controversy comes after Turkey's constitutional court in July annulled a criminal code provision punishing as "sexual abuse" all sexual acts involving children under the age of 15.