Turkey's constitutional court has prompted anger after voting to scrap a law that automatically categorises sexual acts with children between the ages of 12 and 15 as sexual abuse.

Judges in the country's highest court voted to annul the provision by a narrow margin, in response to an application from a district court which complained the law did not differentiate between age groups in cases of child sexual abuse.

The complaint also said the law failed to take into account the “consent” of victims in cases where the child victim was between the ages of 12 and 15 and able to understand the meaning of the sexual act. The law's removal is due to take effect in January.

Human Rights groups condemned the move - saying it would lead to cases of child abuse going unpunished - while Sweden's foreign minister suggested the vote in July had effectively legalised sex with children.

Margot Wallström said: "Turkish decision to allow sex with children under 15 must be reversed. Children need more protection, not less, against violence, sex abuse."

Meanwhile, professor Bahar Gökler, chair of the Association to Prevent Child Abuse and Neglect, told state-run Turkish news agency Anadolu: "Seeking a child’s consent in cases of sexual abuse is out of the question.

“First of all, every individual under the age of 18 is a ‘child’ according to international conventions."

But Turkish ministers insisted critics were “misinformed” and “spreading lies” which could tarnish the country's reputation.

Deputy Prime Minister Memet Simsek tweeted that Ms Wallström should "get her facts right", while Turkish Foreign Minister Mevlut Cavusoglu said in televised comments cited by AFP: “It is a scandal for a foreign minister to post such a tweet based on false news or speculation.

"A foreign minister should not tell lies and should not adopt an approach accusing Turkey. Yes to criticism but this is a slander, a lie.”

Turkey has summoned Sweden's envoy to meet officials in Ankara in response to Ms Wallström's tweet. The Austrian chargé d’affaires was also called to the Turkish capital at the weekend after a news ticker at Vienna airport reported that Turkey had legalised sex with children.

The Constitutional Court sought to clarify the situation with a press release that stated: “Sexual abuse actions against children will not be decriminalised and will not remain unpunished, and the legislative body will be provided the opportunity to make a new regulation within the scope set out in the grounds.”

However, the statement did not say the vote would be reversed or that sex with children between the ages of 12 and 15 would remain illegal in all instances. Instead, the court said only that the old law would remain in place until January, and might then be replaced with new legislation.

Professor Aysun Baransel, General Secretary of the Association to Prevent Child Abuse and Neglect, told Anadolu that the creation of new legislation must be prioritised.

“The most important point is that unless this provision is urgently addressed, child abusers will start walking around freely because there is no new regulation [to fill the void]," she said.

She added that if no new legislation was introduced, after January child sexual abusers would be tried in the same way as people who sexually abuse adults.

In pictures: Turkey coup attempt Show all 17 1 /17 In pictures: Turkey coup attempt In pictures: Turkey coup attempt Turkish President Erdogan attends the funeral service for victims of the thwarted coup in Istanbul at Fatih mosque on July 17, 2016 in Istanbul, Turkey Burak Kara/Getty Images In pictures: Turkey coup attempt Soldiers involved in the coup attempt surrender on Bosphorus bridge with their hands raised in Istanbul on 16 July, 2016 Gokhan Tan/Getty In pictures: Turkey coup attempt A civilian beats a soldier after troops involved in the coup surrendered on the Bosphorus Bridge in Istanbul, Turkey, 16 July, 2016 REUTERS/Murad Sezer In pictures: Turkey coup attempt Surrendered Turkish soldiers who were involved in the coup are beaten by a civilian Reuters In pictures: Turkey coup attempt Soliders involved in the coup attempt surrender on Bosphorus bridge Getty In pictures: Turkey coup attempt Supporters of Turkish President Recep Tayyip Erdogan wave flags as they capture a Turkish Army vehicle Getty In pictures: Turkey coup attempt People pose near a tank after troops involved in the coup surrendered on the Bosphorus Bridge in Istanbul, Turkey, 16 July, 2016 Reuters In pictures: Turkey coup attempt Turkish soldiers block Istanbul's Bosphorus Brigde Getty In pictures: Turkey coup attempt A Turkish military stands guard near the Taksim Square in Istanbul Reuters In pictures: Turkey coup attempt Pierre Crom/Twitter In pictures: Turkey coup attempt Turkish soldiers secure the area as supporters of Recep Tayyip Erdogan protest in Istanbul's Taksim square AP In pictures: Turkey coup attempt People demonstrate in front of the Republic Monument at the Taksim Square in Istanbul Murad Sezer/Reuters In pictures: Turkey coup attempt Turkish soldiers detain police officers during a security shutdown of the Bosphorus Bridge Reuters In pictures: Turkey coup attempt Turkish Army armoured personnel carriers in the main streets of Istanbul Getty In pictures: Turkey coup attempt Chaos reigned in Istanbul as tanks drove through the streets EPA/TOLGA BOZOGLU In pictures: Turkey coup attempt Turkish President Tayyip Erdogan speaks to media in the resort town of Marmaris Reuters In pictures: Turkey coup attempt Supporters of President Erdogan celebrate in Ankara following the suppression of the attempted coup Reuters

The head of the Turkey Federation of Women’s Association (TKDF), Canan Güllü, told Hurriyet Daily that activists were now considering bringing the case to the attention of the European Court of Human Rights, to see if the amendment could be reversed.

“This decision will lead to unwanted marriages," she said.

"People will be able to kidnap and rape children, marry them at an early age, and prevent them from going to school.

“We are looking to see whether we can make an appeal to annul the decision. We could go to the European Court of Human Rights."