The Turkish Parliament passed legislation Wednesday allowing imams to perform marriages. Women’s rights groups, who have strongly condemned the reform, warn it would exacerbate the problem of underage marriages.

The new law comes amid wider concerns over the erosion of women’s rights under emergency rule.

“We wont be silenced,” chanted women protesting the new legislation in the heart of Istanbul.

Since Turkey is a secular state, only state officials were allowed to carry out marriages. The new law met stiff opposition in parliament. Senal Sarihan, parliamentary deputy for the main opposition CHP Party, said the new law undermines secularism, which helps to protect women’s rights.

“This is an attempt by the ruling party to impose their political understanding to regulate life according to religion,” Sarihan said. “And this is against [the] constitution. And we are not accepting this.”

There are concerns that the reform will exacerbate the problem of underage marriages. Women’s rights groups argue Imams already are carrying out marriages involving underage girls in unofficial religious ceremonies. But Turkish president Recep Tayyip Erdogan, who is seeking to consolidate his religious voting base ahead of presidential elections, has strongly backed the move, dismissing criticism as alarmist.

“They are heading to the streets making a fuss,” he said. “Whether you want it or not, this legislation will pass in the parliament. The marriages will not go unrecorded, they will be under record. On the contrary, this implementation will abolish unofficial marriages.”

Erdogan claims the reform will legitimize marriages, particularly in Turkey’s conservative rural regions, where unions often are only carried out by imams.

Women’s rights groups counter that underage marriages remain a major problem in these regions and has grown due to earlier government reform allowing older girls to study at home.

A campaign supported by Erdogan a decade ago to increase the number of girls attending school curbed child marriages. But critics claim Erdogan’s ruling AK party has in recent years moved away from its reformist policies, becoming more authoritarian, a process accelerated by the introduction of emergency rule following last year’s failed coup.

Under emergency rule, many women’s rights groups, especially in Turkey’s rural Kurdish region, have been shut down. With a presidential election looming, and Erdogan seeking to consolidate his religious and nationalist base, women’s rights groups are voicing growing alarm about the direction in which the country is heading.