Women in Iranian capital Tehran will no longer be arrested for going out with their heads uncovered, The Telegraph reported.

The move comes 39 years after a strict dress code was introduced in the country after the 1979 revolution.

“Those who do not observe the Islamic dress code will no longer be taken to detention centres,” the Tehran Times quoted Tehran Police chief General Hossein Rahimi as saying. “We will not file judicial cases against them either.”

However, violators will be asked to attend classes given by the police, local media reported. Repeat offenders could be subject to legal action. More than 100 counselling centres in the Tehran Province will conduct these classes, Rahimi said.

Outside Tehran, the strict dress code will remain in place.

Iran’s decision to relax the dress code comes three months after Saudi Arabia announced it was ending a ban on women driving.