A high court in India has ruled that the hijab is not "essential" to Islam, paving the way for schools to disallow headscarves from campuses.
The much-awaited verdict comes in the wake of a row over the headscarf in the southern state of Karnataka.
A state college's decision in January to bar entry to Muslim girls wearing the hijab had sparked protests.
The issue snowballed, forcing the state to shut high schools and colleges for several days.
On Monday, ahead of the verdict, the state government restricted large gatherings and shut educational institutions in some areas.
The court said the state government had the right to "prescribe" uniforms for students as a "reasonable restriction on fundamental rights".
The matter had reached the court after the protesters filed petitions arguing that India's Constitution guaranteed them the right to wear headscarves.
A judge who first heard the case referred it to a larger bench on 9 February, citing the "enormity" of the questions being debated.
The three-judge bench, while hearing the case, passed a contentious interim order that said students couldn't wear religious clothing - including the hijab - until the court reached a verdict.
This forced several Muslim women to skip classes and even their exams while the case was being heard. The row also polarised opinions, with critics seeing it as yet another attempt at marginalising Muslims by Prime Minister Narendra Modi's Hindu nationalist government.
It all started in a government-run college in Karnataka's Udupi district, which barred six teenage students from wearing the hijab in class.
The college said it allowed students to wear the hijab on campus and only required them to remove it inside the classroom. But the girls, who all wore the mandatory college uniform, started a strike outside the college, arguing that they should be allowed to cover their hair in the classroom.
Udupi is one of three districts in Karnataka's communally sensitive coastal region - a stronghold of Mr Modi's right-wing Bharatiya Janata Party (BJP).
The protests soon spread to other colleges in the state, which is also governed by the BJP. Some Hindu students began coming to classes wearing saffron shawls - the colour is seen as a Hindu symbol - which forced officials to insist that both could not be allowed on campus.
The issue got international attention after some demonstrations spiralled into violence - Nobel Prize-winner Malala Yousafzai tweeted about the issue, asking India's leaders to do something to "stop the marginalisation of Muslim women".
Reporting by Imran Qureshi, BBC Hindi