Police in Iran's capital of Tehran said they will no longer arrest women for failing to observe the Islamic dress code and instead send them to classes at counseling centers.

The Tehran Times on December 28 quoted Brigadier General Hossein Rahimi as saying that “those who do not properly observe the Islamic dress code will no longer be taken to detention centers, nor will judicial cases be filed against them.”

The semiofficial Tasnim news agency said violators will instead be made to attend classes given by police officials. Repeat offenders, it said, could still face legal action.

The news agency said the dress code will remain in place outside the capital.

Rahimi said there were more than 100 counseling centers in Tehran Province to handle the duties related to the dress code.

Iran’s conservative dress regulations have been in place since the 1979 revolution.

Hard-liners still dominate Iran's security forces and the judiciary, so it remains unclear how effective the easing of the dress code will be on the streets of the city.

Under the rules, women in Iran have been forced to cover their hair and wear long, loose garments.

Younger and more liberal-minded women have often worn loose head scarves that don't fully cover their hair and taken to other fashion methods to push the regulations to the boundaries.

Men have also been stopped by Iran's morality police if they are spotted wearing shorts or going shirtless.

People deemed as violating the law are generally taken by van to police stations, where their families are called to bring them a change of clothes. Those detained are required to sign a document saying they will not commit the offense again.

President Hassan Rohani, who came into office in 2013, has said it is not the job of police to enforce religious rules and has often pressed for a relative moderation of some laws.

With reporting by The Tehran Times, AP, dpa, and AFP