A question of whether more or less hair should be on public display has become an issue of controversy in the current febrile political climate in Turkey amid accusations of attempts to Islamicise the country’s military by Recep Tayyip Erdogan.

The Ministry of Defence in Ankara has announced that rules will be changed to allow women in the armed forces to wear headscarves with their uniforms. And, at the same time, there are calls from conservative Muslim groups for male service personnel to be allowed to grow beards.

Critics of the government charge that this is yet another attempt to undermine the position of the military as the staunch defender of secularism instituted by Kemal Ataturk, and create a more religious force who will be loyal to President Erdogan.

The decision comes as fresh recruits are entering Turkey’s military academies for the first time since last summer’s attempted coup while tens of thousands of service personnel remain in prison or have been dismissed for alleged ties with the exiled cleric, Fethullah Gulen, who has been blamed for orchestrating the plot.

A decree by President Erdogan has stripped from the three branches of the armed forces their role of running their own academies with the responsibility transferred to a Ministry of Defence over which, it is claimed, the ruling AKP Party is busy tightening its grip. There has been an overhaul of the military teaching and training system with a new changed curriculum, details of which are yet to be made public.

All this is taking place during a volatile run-up to a referendum on far-reaching changes to Turkey’s constitution giving Mr Erdogan extensive powers as executive president; abolishing the post of prime minister; and bringing in new rules for prosecutors and judges. Turkey, meanwhile, slides into increasingly violent strife with repeated attacks from the Kurdish separatist PKK as well as Isis terrorists sent from across the Syrian border.

President Erdogan’s chief military adviser, Colonel Ali Yazici, was arrested after being accused of involvement in the coup attempt. He has been replaced by Adnan Taniverdi, a former Brigadier General, who was dismissed from the Army in 1997 for allegedly harbouring Islamist sympathies.

Mr Tanriverdi owns Sadat, which is described as “providing consultancy and military training services in the international defence and interior security sector”. Critics of the government and opposition MPs are suspicious that its mission now could turn to training official and unofficial paramilitary forces to fight President Erdogan’s enemies inside and outside the country.

Conservatives have argued that the ruling on head covering is an empowering step for women. They have a poster girl, Merve Gurbuz, a 23 year old computer student, who could become Turkey’s first hijab wearing fighter pilot.

Female civilian employees of the armed forces were allowed to cover their head and males to grow beards in a change of law three months after the coup and allowing hijab for serving women is a logical extension, says the government. No decision, officials say, has been made on the matter of beards.

The government insist that the reform of the military is imperative because the Gulenists had subverted the system as they have done in other state structures. However, even some who are not Erdogan loyalists acknowledge Gulenist infiltration in the past. Nihat Ali Ozcan, an academic and former army officer, claimed that the followers of the Cleric played a long game. He said: “If you look at the time from which they began this process, about 35 years, shows the senior ranks, one and two star generals, who took part in the coup. We had exam papers stolen for exams. They also focused on getting into personnel and medical departments, in that way they could channel promotions.”

The fact that Mr Erdogan and the AKP were happy to collude with the Cleric against the secularists in the past is not something which is mentioned much now publicly in Turkey. There have been repeated accusations that the attempted coup is being used as an excuse to crack down on political opponents.

What is seen as creeping Islamisation of Nato’s second largest army is causing deep concern among former senior officers and others who feels that Turkish secularism is under threat. Turker Erturk, a former Rear Admiral, commented: “What is happening is clear. They want to build a new military and they are starting with the academies to exercise control.” Erdogan Karakus, a retired lieutenant general, held that the headscarf decision was a political one interfering with military officers. “We don’t want to involve politicians in our Air Force, Army, Navy,” he said.

But criticising the government remains a risky business in Turkey. A report in the Hurriyet newspaper stating that the “military were uneasy” about the current moves led to threats of prosecution. Mr Erdogan complained that the article was “very ugly… Nobody has the right to pit those in the state against each other, everyone should know their place. You are being disrespectful.”