(CNN) Turkey has withdrawn a controversial bill which would have pardoned men convicted of child rape, if they married the victim.

The bill, which was proposed by Turkey's ruling Justice and Development Party (AKP), sparked protests across the country and prompted fears from the United Nations about child sex abuse.

Prime Minister Binali Yildirim has now sent the bill to a parliamentary subcommittee to be reworked, state-run news agency Anadolu said Tuesday.

The Turkish government said the bill would have applied to at least 3,000 men already in prison, Anadolu added.

But the United Nations said in a statement that the bill would "would create a perception of impunity in favor of perpetrators of such child rights violations.

"In addition, it would increase the risk for further victimization of the child if she marries the perpetrator of the sexual abuse."

Following fierce criticism from opposition parties and the public, Turkish President Recep Tayyip Erdogan advised caution in moving forward with the bill.

"It is obvious that the debate that started during the negotiations of the draft law necessitates reconsideration of the issue, which leads to very different reactions, criticisms and proposals in the public opinion," he told Anadolu.

The legal age of sexual consent in Turkey is 18, but the practice of child marriage is widespread, according to UNICEF.

Tensions with Europe

JUST WATCHED Media and military targeted in Turkey Replay More Videos ... MUST WATCH Media and military targeted in Turkey 02:16

Opposition to the proposed bill comes as the European Parliament meets Tuesday to discuss whether to freeze talks on Turkey joining the European Union, with a final vote due Thursday.

The outcome looks grim for Turkey. The attempted coup in July -- and subsequent crackdown led by Erdogan -- has greatly strained Turkey's relations with the EU.

Turkey has crossed the line of what is acceptable for an EU candidate-country Kati Piri

"Turkey has crossed the line of what is acceptable for an EU candidate-country," rapporteur for Turkey at the European Parliament, Kati Piri, told CNN in a statement ahead of the debate.

"(This involves) the arrest of 10 Turkish opposition MPs, the jailing of 142 journalists critical to the ruling government and the imprisonment of tens of thousands of citizens without legal proceeding."

"We should maintain a dialogue, but under the current situation it is not credible to continue the talks on EU membership."

Following the failed military coup, Erdogan also told CNN he would approve reinstating the death penalty if lawmakers backed the measure in parliament.

If Turkey brought back capital punishment, it wouldn't be joining the European Union anytime soon, according to EU foreign policy chief Federica Mogherini.

Many Syrian refugees attempting to reach Europe make the perilous sea journey from Turkey to Greece.

Added to this is increased tensions over the refugee crisis. In August, Turkish officials threatened to stop implementing the deal Turkey signed in March to take back migrants who had crossed into Greece.

What are Erdogan's priorities?

JUST WATCHED Turkey: A country in turmoil Replay More Videos ... MUST WATCH Turkey: A country in turmoil 01:09

Turkey first began EU accession negotiations in 2005 -- but is it still top of Erdogan's list in 2016?

"Erdogan is far more focused on Turkish domestic issues and securing more power for himself, than he is about EU membership and securing visa-free travel for Turks throughout the EU," explained CNN International Correspondent Will Ripley.

Added to this, the country has also suffered an increasing number of terror attacks in recent years from ISIS and the Kurdistan Workers' Party (PKK), both of which have strongholds in neighboring Syria.

On Monday, Erdogan called for an overhaul of the United Nations, saying its Security Council had failed to address the Syria conflict and other global challenges.

The Turkish President gave an unabashed speech in Istanbul at the closing of a NATO meeting, where he slammed the Security Council's concentration of power, reiterating that "the world is bigger than five."

Thousands of security personnel dismissed

JUST WATCHED Crackdown on protests in Turkey Replay More Videos ... MUST WATCH Crackdown on protests in Turkey 00:57

For now, Turkey's post-attempted coup crackdown continues. Tuesday, the government dismissed almost 10,000 security personnel -- including some 7,586 police officers -- for alleged connections to outlawed organizations, according to Anadolu.

In addition to the security dismissals, 550 non-governmental organizations, 19 private health institutions and nine media organizations have also been shut down, said Anadolu.