A legal battle over whether Egypt’s police force should employ bearded officers is set for another day in court, after pro-government lawyers challenged an employment appeal on the grounds that beards were a sign of secret Islamist allegiances.

Cairo’s court for urgent matters will on 4 September hear a case brought by the pro-state lawyer Mohamed Salem, who reportedly alleges that bearded officers present “a threat to Egyptian society and the national unity, peace and social security of the nation”.

Hosni Mubarak: Egypt's toppled dictator freed after six years in custody Read more

The case seeks to overturn a recent ruling by Egypt’s supreme administrative court in favour of a group of officers, including a police colonel, who were fired for having beards. Samir Sabry, another pro-government lawyer, has appealed against the decision.

Salem has argued the bearded police officers were disobeying rules set by the Egyptian ministry of interior, which oversees the police force. He claimed the police officers had revealed their allegiance to the banned Muslim Brotherhood political group after they wore beards when it was in power.

The case marks a turning point in a five-year legal tug-of-war between the interior ministry, with its longstanding directive to ban beards, and the country’s courts – which have repeatedly upheld the rights of bearded officers to remain employed. The dispute, which dates back to the rule of Gamal Abdel Nasser, who rose to power in 1954, is rooted in a ban on facial hair or any other perceived sign of Islamist leanings among those in the army or police force.

“How does a beard have anything to do with a policeman being able to apply the rule of law, or be fair?” said a former police officer, who was suspended following a 2012 ruling to ban beards, and who requested not to be named.

“To ban beards is discrimination,” he said. “We don’t do this as a fashion thing, we’re following the prophet Muhammad and sharia law. From the beginning we wanted to show that this isn’t a political demand, but a personal one.”

Beards are not considered mandatory by all Islamic scholars, but some sectors of the Egyptian state have long associated beards with political Islamism.

Egypt's Sisi is sworn in for a second term, amid crackdown on dissent Read more

The overthrow of the former autocrat Hosni Mubarak in 2011 was followed by protests from police officers who wanted to grow their beards, and with a Facebook group called “I am a bearded police officer” being set up. A protest outside the palace of the country’s former president Mohamed Morsi, the bearded leader of the Muslim Brotherhood, led to a court ruling overturning the ban on beards in February 2013.

However, the case against beards shifted dramatically in the same year after the overthrow of the Muslim Brotherhood and an aggressive campaign by the present government of Abdel Fatah al-Sisi, to stamp out all forms of perceived Islamism in the country, including a purge of police officers accused of connections to the group.

Sisi’s rule has been marked by the “worst rights and political crisis in decades”, according to Human Rights Watch, with a widespread crackdown on Islamists.