The military’s stance softened somewhat in 2015, when an army court ruled that veiled relatives of soldiers could enter military grounds. The army’s cultural shift was also reflected in last July’s failed coup attempt. The government claims that the putsch was organized by an Islamist faction within the military, an institution previously assumed to be staffed mainly by Kemalists — followers of Mustafa Kemal Ataturk, the founder of the secular Turkish state.
Women serve only as officers or noncommissioned officers in Turkey. As of 2013, the last year of official data, there were 1,345 female commissioned officers and 370 female noncommissioned officers out of 723,741 military personnel in Turkey.
The decision to allow female soldiers to wear head scarves threatens to deepen concerns that Mr. Erdogan seeks to sever the country from its secular moorings.
Mr. Erdogan’s party has criticized claims that its members are Islamists, believers in a political system based on Islamic legislation. Nevertheless, Mr. Erdogan has increased the number of religious schools and speaks of creating a more pious generation of Turks.
After the July coup attempt, Mr. Erdogan also caused alarm in secular circles when he appointed as his military adviser a former one-star general who was fired from the army a few months before the 1997 military intervention because of concerns about his religiosity.
Mr. Erdogan’s toughest critics fear he secretly hopes to create a second Iran, where a teenager was expelled from the national chess team on Monday for refusing to wear a head scarf during a tournament in Spain.
Erdogan Karakus, a retired three-star general and head of the Turkish Retired Officers Association, claimed that Wednesday’s decision was an unnecessary intervention in military affairs and argued that the head scarf was too loaded a symbol for use within the military.
“We don’t want to involve politicians in our air force, army, navy,” Mr. Karakus said in a telephone call. “If somebody wants to wear beach clothes in the office in the United States, do you accept it?”
But many welcomed the decision. While some criticize Mr. Erdogan for disregarding democratic norms, citing a continuing purge of thousands of people accused of being dissidents, others praise him for bringing dignity to Turkey’s pious majority, which for decades was excluded from public life by the country’s secular elite.
What happened on Wednesday was the latest part of that emancipatory process, said Ravza Kavakci, a lawmaker from Mr. Erdogan’s party. “I think it is a very important step in the path of democratization,” she said.
Ms. Kavakci’s older sister, Merve, was once one of those particularly affected by discrimination against veiled women. Professor Merve Kavakci is herself a former lawmaker who was screamed at, and later expelled from Parliament, when she arrived at the building wearing a head scarf in 1999.
In a separate interview, the elder Ms. Kavakci said that Wednesday’s decision simply made Turkey more tolerant of religion, rather than less secular. She said it would make Turkey more like the United States, where she felt freer to display her religious identity when she lived there.
“It’s not that Turkey is not secular any more. It’s that Turkey is no longer secular fundamentalist,” said the elder Ms. Kavakci, now a political scientist and head of postcolonial studies at Uskudar University. “In the past, Turkey has, with its secular-fundamentalist ideology, embraced a very intolerant secularism where religion was subjugated and controlled by the state authority. And now we’re trying to change that.”
In a statement released later in the day, she added: “From the day I was ousted from the Parliament it’s a dream come true. This is a clear victory for women empowerment.”
Others were more circumspect. Professor Jenny White, an expert on the changing role of Islam and secularism within Turkey, argued that the democratization process was just one of several possible explanations for Wednesday’s intervention.
“It could just be completing the process, having everyone everywhere able to wear head scarves, or it could be a way of humiliating the remaining Kemalist officer corps by breaking that last taboo,” said Ms. White, the author of “Muslim Nationalism and the New Turks,” a book about identity in contemporary Turkey.
“I would characterize this,” Ms. White added, “as the ultimate humiliation of the Kemalist military.”