Indonesia has banned public schools from making religious attire compulsory, after the story of a Christian student being pressured to wear a headscarf in class went viral.
The 16-year-old girl was attending a school that had a rule that all students had to wear the Muslim headscarf.
The government has given schools 30 days to revoke any existing rules.
Indonesia, a Muslim-majority country, officially recognises other religions.
But there are growing concerns about rising religious intolerance.
The ban was signed into decree on Wednesday, and schools which do not comply may face sanctions.
Indonesia's Minister for Education and Culture Nadiem Makarim said the choice of wearing religious attire was "an individual's right… it is not the school's decision".
'Where are my religious rights?'
The issue captured national attention in recent weeks after a student from a Christian family who was attending a vocational school in Padang was repeatedly asked to wear a Muslim headscarf in class in January.
She refused, and her parents were called in to speak to school officials.
Her parents secretly filmed a video of the meeting and posted it on social media, which prompted a backlash online.
In the video, the official insisted that the school had a rule that all female students, including non-Muslims, must wear the headscarf according to school rules.
"Almost every day, my daughter has been summoned for not wearing a headscarf, and her answer is that she is not Muslim," Elianu Hia, the father of the girl, told BBC News Indonesia.
"If I (force) my daughter to wear the headscarf, I will be lying about my daughter's identity," Mr Hia added. "Where are my religious rights? This is a public school after all."
The school's principal later apologised at a press conference and said the student would be allowed to dress according to her own religious beliefs.
At a media briefing on the decree on Wednesday, religious affairs minister Yaqut Cholil Qoumas was quoted as saying: "Religions do not promote conflict, neither do they justify acting unfairly against those who are different."
Andreas Harsono, a researcher at Human Rights Watch, told Reuters news agency the decree was a positive step, given that schools in more than 20 provinces still make religious attire mandatory in their dress code.
"Many public schools require girls and female teachers to wear the hijab that too often prompt bullying, intimidation, social pressures, and in some cases, forced resignation," he said.
Indonesia is the world's largest Muslim-majority country, but it officially recognises six religions and has enshrined pluralism in the state philosophy known as Pancasila.
You might also like: