Turkish President Recep Tayyip Erdogan said on Wednesday that the ruling Justice and Development Party (AKP) may submit a constitutional amendment guaranteeing the right of women to wear the headscarf to a referendum.

President Recep Tayyip Erdogan's ruling Justice and Development Party has met the opposition on the issue as the parties vie for support ahead of presidential and parliamentary elections.

The debate over wearing the headscarf has recently heated up in Turkey ahead of the presidential and parliamentary elections scheduled for next June.

Turkey, which has enshrined secularism in its constitution, has long banned the wearing of headscarves in state institutions, schools and universities, as well as in places such as parliament and army buildings.

Erdogan's government lifted restrictions on headscarves in 2013.

But unlike the 1990s, when the subject sparked intense debate, no political movement is currently proposing to ban it in Turkey.

But the secular Republican People's Party, which has long opposed the wearing of headscarves in parliament and government interests, revived the issue last month with a proposal to protect the right, in a bid to win the support of religious Turks.

In response, Erdogan stepped up and proposed a constitutional reform of the issue that would include measures to protect the family from what he called "deviant tendencies."

He said a referendum could be held if the bill did not have the support of the minimum 360-member parliament needed to make constitutional changes in the 600-seat parliament.

The Justice and Development Party and its nationalist allies occupy 334 seats.

"We are ready to take other steps, including holding a referendum," Erdogan told AKP lawmakers in parliament.

The Justice and Development Party held talks with 3 opposition parties on Wednesday.

The largest party, the Republican People's Party, said it would not support the amendments.