The violator is then required to sign a form that they will not commit the offense again.

Police in Iran’s capital said today they will no longer arrest women for failing to observe the Islamic dress code in place since the 1979 revolution.

The announcement signaled an easing of punishments for violating the country’s conservative dress code, as called for by the young and reform-minded Iranians who helped re-elect President Hassan Rouhani, a relative moderate, earlier this year.

But hard-liners opposed to easing such rules still dominate Iran’s security forces and judiciary, so it was unclear whether the change would be fully implemented.

“Those who do not observe the Islamic dress code will no longer be taken to detention centers, nor will judicial cases be filed against them.” Tehran police chief Gen Hossein Rahimi was quoted as saying by the reformist daily Sharq.

The semi-official Tasnim news agency said violators will instead be made to attend classes given by police. It said repeat offenders could still be subject to legal action, and the dress code remains in place outside the capital.

For nearly 40 years, women in Iran have been forced to cover their hair and wear long, loose garments. Younger and more liberal-minded women have long pushed the boundaries of the official dress code, wearing loose headscarves that don’t fully cover their hair and painting their nails, drawing the ire of conservatives.

Iran’s morality police — similar to Saudi Arabia’s religious police — typically detain violators and escort them to a police van. Their families are then called to bring the detainee a change of clothes.

The violator is then required to sign a form that they will not commit the offense again.

Men can also be stopped by the police if they are seen wearing shorts or going shirtless.