The death of a young woman in police custody has sparked outrage and grief across the country.

According to media reports, thousands attended the funeral of 22-year-old Mahsa A. in her hometown of Saghes in northwestern Iran on Saturday.

There are said to have been isolated calls of protest against the Iranian police.

Many Iranians also mourned the loss of the young woman on social media.

Mahsa A. was arrested by the moral and religious police on Tuesday during a family visit in the capital Tehran because of her "un-Islamic" clothing and taken to a police station.

According to the police, she fainted there due to heart failure and then fell into a coma.

Her death was confirmed on Friday.

allegations of torture and ill-treatment

According to the broadcaster 1500tavsir, which reports on human rights abuses in Iran, she suffered a blow to the head.

The human rights organization Amnesty International reported that there were "allegations of torture and other ill-treatment in custody" and called for an investigation into the circumstances of the young woman's "suspicious" death.

There is a version circulating on the Internet that the woman was arrested because her headscarf did not fit properly and a few strands of hair were visible.

When she was arrested, she was hit on the head, which led to a brain hemorrhage, a coma and ultimately - on Tuesday - to her brain death.

The police have vehemently rejected this account and are trying to prove their version with unverifiable video recordings. 

Amini's body was taken to the coroner's office, according to state television.

Before the death became known, Iranian President Ebrahim Raisi announced that he had commissioned the interior minister to investigate the case.

A special team of experienced police officers and coroners should immediately start the investigation.

There was also criticism of the moral police in parliament and from leading clerics, including ex-President Mohammad Khatami.

In her view, the incident not only badly damaged the country's reputation, but also that of Islam.

Strict dress codes for women

Iran has had strict dress codes for women since the 1979 Islamic Revolution.

For just as long, however, women, especially in the metropolises, ignored them - much to the annoyance of ultra-conservative politicians.

Over the past two decades, many women in Tehran and other major cities have casually interpreted the regulations, allowing strands or more of their hair to peek out of their veils.

The government in Tehran and the hardliners in parliament have been trying for months to enforce Islamic laws more strictly.

The vice squad enforces the dress codes, sometimes with force, which has led to protests and defiant reactions from women in recent weeks.