In what could be a precedent-setting decision, the Strasbourg-based court rejected appeals by two Turkish students who said the ban and their subsequent exclusion from class violated their freedom of religion.
Turkey is a majority Muslim society but instituted a rigid secular state in the 1920s after the collapse of the Ottoman Empire. Its secular establishment views the headscarf as a challenge to this separation of church and state.
Turkey argued before the court that headscarves violated the secular nature of its state.
"The principle of secularism was surely one of the founding principles of the Turkish state," they added. "Safeguarding this principle can be considered necessary for the protection of the democratic system in Turkey."
Implementation of the ban has intensified since 1997 when the military delivered an ultimatum to the government of the day.
Supporters of the ruling Justice and Development Party would like the government to lift the ban, but it dares not defy the military on this sensitive matter, which the military sees as a touchstone of modern Turkey’s secular identity.
The decision brought stinging criticism from right group Human Rights Watch.
The Turkish government's heavy-handed interference in universities, coupled with a strict ban on headscarves for students and teachers, inhibits academic freedom, Human Rights Watch (HRW) said in a report.
The 46-page report analyses the state-imposed ban that has excluded thousands of women from higher education. Hundreds of others have been suspended or discharged from teaching posts as a result.
"Headscarves do not pose a threat to public safety, health, order or morals, and they do not impinge on the rights of others"
Human Rights Watch report
The subject is of even greater contention in Turkey than elsewhere in Europe. Many of Turkey's secularists believe that the religious parties plan to eliminate secularism bit by bit, and that the headscarf is the first step.
Moreover, the restriction of women's dress is discriminatory and violates their basic human rights, right to education, their right to freedom of thought, conscience and religion, and their right to privacy, added the report.
It accused the Turkish government of imposing the headscarf ban in the name of secularism when in fact the protection of religious freedom is fully consistent with secularism in state institutions.
"Requiring or forbidding students to wear visible religious dress is a failure in the duty of the state to avoid coercion in matters of religious conscience", said the rights group.
Turkey banned the headscarf in
the name of secularism
Human Rights Watch urged the government to lift the headscarf ban as part of a broader strategy for remedying shortcomings in the protection of women and improving their access to education and employment.
"The Turkish government has still not dispelled the coercion and self-censorship that pervade academic life," said Rachel Denber, Acting Executive Director, Europe and Central Asia Division-Human Rights Watch. "Professors continue to be disciplined for challenging state practices."
"The Turkish authorities say they want to protect women who choose not to wear the headscarf," said Denber. "But bullying women out of higher education because of the way they choose to dress is a poor way to protect women's freedoms."
A similar approach has been suggested by the United Nations Committee on the Elimination of Discrimination Against Women.
The Human Rights Watch report questions the zero-sum assumption that the broadening of the rights and freedoms of devout Muslims would necessarily narrow those of non-Muslims and secularists.
The report also highlights the efforts of groups working within Turkish society toward a genuinely pluralist approach to ensure that women are able to make their own free choice whether to wear the headscarf.