A woman in Iran who removed her headscarf in public has been sentenced to two years in jail.

The verdict was handed down this week, with prosecutors saying the woman encouraged "corruption through the removal of the hijab in public”, according to The Independent.

Although the sentence was for two years, Tehran prosecutor Abbas Jafari-Dolatabadi said 21 months had been suspended, and the woman would only serve three months without parole. She intends to appeal against the verdict.

Iranian woman
An Iranian woman removes her headscarf in public

Dolatabadi also said the woman is in need of medical attention.

She is "in need of long-term medical treatment and has to be seen by a psychiatrist," he said, according to the BBC.

But he also criticized the move to suspend the majority of the woman's sentence.  He argued that the woman should be forced to serve the full term.

Since wide scale protests erupted in Iran last year, many women in the country have been photographed removing their hijab in public. Others have shared images of themselves doing so on social media.

A 31-year-old female demonstrator became iconic in December, after an image of her removing her headscarf in Tehran went viral. She became known as the “Girl of Enghelab Street”, referencing the place where she carried out the defiant act.

After being detained for several weeks, the woman – identified as Vida Movahed – was eventually released.

More than 30 Iranian women have been arrested by authorities for removing their veils in public since December.

“The compulsory veiling of women in public — be they religious or not — has been a hallmark of Iranian political and social life since 1979,” Behnam Ben Taleblu, senior Iran analyst at the Foundation for the Defense of Democracies in Washington, told the Washington Post

“As life in Iran continues to be punctuated by political and social protest, mandatory veiling has been a popular target," he said.

However, despite the tradition, Tehran's police chief said last month that his deputies would no longer arrest women for violating the country's dress code. 

Iranian President Hassan Rouhani, who is seen as a moderate pushing for change in the country, also released a report in 2014 that revealed nearly 50 percent of the population is against government officials enforcing the veil.

The hijab has not always been a requirement for women in Iran. In fact, in the 1930s, the country's ruler Reza Pahlavi banned the garment all together.

Then, following the country's revolution in the 1970s and the overthrow of the ruling family, the veil became a mandatory garment for women. 

Iran’s Islamic revolutionary leader, Ayatollah Ruhollah Khomeini, announced the requirement in 1979. After his decision, tens of thousands of women marched in protest.