An Iranian woman set herself on fire outside a courthouse in Tehran on Monday to protest being charged with trying to impersonate a man and illegally attend a soccer match, according to reports.

The woman was charged with “insulting the public by defying the dress code for women,” court documents said, and was told she could face six months in prison. She set herself on fire after leaving the courthouse, The Telegraph reported Wednesday.

The woman, identified only as “Sahar,” was arrested earlier this year after she allegedly tried to enter the stadium dressed as a man and resisted arrest. Since the 1979 Iranian Revolution, the country's Islamic government has banned women from attending sporting events.

IRANIAN WOMEN SNEAK INTO MEN-ONLY SOCCER MATCH WITH FAKE BEARDS

After setting herself ablaze, she was taken to Motahari Hospital. She was in intensive care with burns over 90 percent of her body, a doctor told Iran’s Rokna News Agency, The Times of Israel reported.

The woman was detained and released on bail after she tried to attend the soccer match in March, her sister told Rokna.

Her sister, who was not identified, also said the woman had bipolar disorder.

FIFA has campaigned for Iranian women to be allowed to attend soccer matches in Iran.

CLICK HERE TO GET THE FOX NEWS APP

“The promotion of gender equality is a priority for FIFA, as per the statutes, and we remain fully cognizant of this, particularly during the FIFA Women’s World Cup,” the council has said.

Though women have been banned from attending games in Iran, an exception was granted this past November when Iranian women were allowed to attend the Asian Champions League final at Azadi Stadium in Tehran. The women were, however, seated separately from the men.

Fox News' Nicole Darrah and The Associated Press contributed to this report.