For nearly 40 years, women in Iran have faced being arrested for failing to observe the conservative country’s strict Islamic dress code.

But now, police in the capital city of Tehran have announced that they will no longer detain women who violate the code — which includes a ban on nail varnish, heavy makeup, and loose headscarves.

It comes after decades of struggle from Iranian women, including protests and demonstrations, which has seen a surge from millennials in recent years, largely thanks to social media.

Take action: Sign This Petition to #LeveltheLaw and Empower Women and Girls Around the World!

“Those who do not observe the Islamic dress code will no longer be taken to detention centres, nor will judicial cases be filed against them,” said Tehran’s police chief General Hossein Rahimi, quoted by the “Sharq” newspaper.

Previously, women who break the dress code have typically been held by police, reported the Independent. Their families are called to bring them a change of clothes, and they are required to sign a form saying they won’t violate the dress code again.

“Based on a society-oriented, educational approach, the police will not arrest those who don’t respect Islamic values,” said Hossein Rahimi, according to Iran’s official Islamic Republic News Agency. “It will instead educate them.”

Read more: In Iran, Women Were Banned From Attending a Soccer Game Because They're Women

According to reports, women who fail to observe the dress code will instead have to attend classes on “Islamic values” given by police. Women who offend repeatedly could be subject to legal action, and the easing of the dress code only applies within the capital.

Since Iran’s Islamic revolution established conservative rule in 1979, women have had to cover their hair and wear long, loose garments, alongside other restrictive rules.

Other sexist laws ban women from attending men’s sporting matches, in part because politicians believe women shouldn’t hear men swear, and prevent women from travelling abroad without the permission of a male relative.

Read more: Women in Iran Are Wearing White to Protest the Forced Wearing of Hijabs

The dress code also applies to men, who can be stopped by police if they are seen wearing shorts or going shirtless.

Some questions are being asked about how effectively the change will be implemented, according to reports, as those opposed to easing these rules still dominate Iran’s security forces and judiciary system.

The country is beginning to see a shift towards the moderate, under President Hassan Rouhani. However, some critics are questioning how big of a change the announcement about the dress code in Tehran really is.

Read more: Gender Equality Actually Got Worse in 2017, World Economic Forum Says

“They should understand that in this day and age, how women dress in none of their business,” Iranian activist Masih Alinejad wrote on Instagram. “This is a small victory but a victory nevertheless. But our true victory is when compulsory hijab is abolished.”

Global Citizen campaigns to end laws that discriminate against women around the world, including through the #LeveltheLaw campaign. You can join us by taking action here.