ANKARA, Turkey (AFP) — Turkey’s religious affairs state agency came under heavy criticism on Thursday from the main opposition party after it said girls as young as nine could marry under Islamic law.

The Diyanet religious affairs directorate said on Tuesday the minimum age for girls to marry was nine, while for boys it was 12, according to Turkish media including the Hurriyet daily quoting the agency’s official website.

The post, which took the form of an explanatory statement on Islamic law, has since been taken down, after a backlash from the opposition and women’s rights groups.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

The head of the High Commission of Religious Affairs Ekrem Keles on Thursday told Hurriyet that the earliest age for a girl to marry is 17 and 18 for a boy.

“Forget a nine or a 10 year old child marrying, a child at 15 should not marry and should not be married,” he said.

The legal age to get married in Turkey is 18.

But Turkish law says that in an extraordinary circumstance, a judge can give permission for a male and female aged 16 to marry.

The controversy touched a nerve in Turkey, where child marriages are not uncommon and the fight continues to raise girls’ level of education.

Main opposition Republican People’s Party (CHP) lawmaker Gaye Usluer accused the government of being “more interested in how to marry children at a young age when there needs to be talk on children’s education, health.”

Meanwhile CHP lawmaker Murat Bakan on Twitter said child marriages “violates children’s rights, women’s rights and human rights.” adding that the party had called for a parliamentary investigation into child marriages.

Women’s rights groups also criticized the agency, which is similar to a religious affairs ministry, accusing it of trying to legitimize child abuse and urging Diyanet to “get their hands off our children.”

The ministry said it had “never and will never approve early marriages” in a statement, saying it was only defining Islamic law.

“Forcing girls to marry before psychological and biological maturity, and before they obtain the responsibility to become a mother and form a family is not compatible with Islam which says will and consent are conditions for marriage,” it added.

Women’s groups as well as Usluer raised concern over Diyanet’s move coming after Turkish President Recep Tayyip Erdogan approved a controversial law in November allowing state-approved clerics to conduct marriage ceremonies.

“When we said ‘if you give muftis [clerics employed by Diyanet] the power to conduct marriages, the issue of child brides will increase,’ this is what we meant,” she said, according to CHP’s website.

Opponents often claim that Erdogan and his Islamic-rooted Justice and Development Party are attacking the republic’s secular foundations, claims dismissed by the government.

In 2016, the government was forced to throw out a bill that could have pardoned men convicted of child-sex assault after a public outcry.