A Paris hospital’s decision to reject an Egyptian trainee doctor because of his beard has been backed by a court, which agreed that patients might have seen it as a religious symbol.

Public hospitals, like other state institutions, must remain secular under France law, and staff are banned from wearing obvious religious symbols such as headscarves.

Nawel Gafsia, a lawyer acting for the doctor, named only as Mohamed A., argued unsuccessfully that the 2-inch beard did not necessarily indicate his religious practices. “My client could have been a hipster,” Ms Gafsia said.

However, the 35-year-old doctor himself “did not deny that his physical appearance was likely to indicate conspicuously a religious conviction,” according to a written judgement by the Versailles appeals court.

Mohamed A. was sent from Menoufia University in northern Egypt for a one-year training course at Saint-Denis hospital in September 2013.

In October, hospital managers told him to trim his beard “so that it could not be seen by staff and users of the public service as an obvious sign of a religious affiliation incompatible with the principles of secularity and neutrality of the public service,” according to court documents.

They repeated the request two weeks later and terminated his training course in February 2014 after he failed to comply.