A picture taken in Tehran shows the front pages of Iranian newspapers bearing portraits of Maryam Mirzakhani.Atta Kenare / Getty

Maryam Mirzakhani will be remembered as a woman who broke glass ceilings in life and in death. In 2014, the Iranian mathematician became the first and only woman ever to win the Fields Medal, popularly known as the Nobel Prize of the math world. And when she died last Friday at age 40, some Iranian media outlets, as well as President Rouhani himself, broke a national taboo by publishing photos in which she appeared with her hair uncovered.

In Iran, women have been required to wear the hijab in public since the 1979 Islamic Revolution. Iranian women rarely appear without the headscarf in the press. Mirzakhani, who grew up in Tehran but attended graduate school at Harvard and became a professor at Stanford, did not wear the hijab.

When Mirzakhani won the Fields Medal three years ago, Iranian newspapers went to extreme lengths to avoid showing her hair: They either digitally retouched her photo to add a hijab, published dated photos in which she appeared wearing one, or drew a sketch of her wearing one. But this past weekend, when the news that she had died of breast cancer at a U.S. hospital dominated the front pages of most newspapers in Iran, some of them finally allowed her to be pictured as she had lived. Mirzakhani had two things going for her this time: She had become a source of deep national pride. And she had passed away.

“In this case, she is dead,” said Haleh Esfandiari, the Iranian American former director of the Middle East program at the Woodrow Wilson International Center for Scholars in Washington, D.C. “Because she’s no longer around, whether they print a picture with or without a hijab doesn’t make a difference for people. It’s not relevant as a policy issue.”

The centrist state newspaper Hamshahri ran a full portrait of Mirzakhani without a hijab, under the headline “Math Genius Yielded to Algebra of Death.” The reformist daily Donyaye Eghtesad did the same, with an accompanying headline that read “The Queen of Mathematics’ Eternal Departure.”

Another reformist daily, Shargh, showed her wearing a hat and dubbed her “The Queen of Numbers Land.” The Iran daily showed her without a hijab but used photo editing to fade her dark hair into a black background. Only ultraconservative newspapers Resalat and Keyhan didn’t splash her image on the front page, according to PRI; Keyhan printed a photo of her wearing a headscarf on an inside page.

Esfandiari added that the emotion many Iranians felt for their world-famous “genius” and “queen”—pride mixed with grief—was so intense that it overrode modesty rules: “People admire her for her achievements and for who she was … and there is a serious sadness around the country, that a young woman who was so promising died of cancer at an early age.”

Masih Alinejad, a Brooklyn-based Iranian writer known for launching the Facebook page My Stealthy Freedom (the campaign encourages women in Iran to post pictures of themselves without a hijab, and has more than a million followers), suggested there was a different underlying motivation in the way some Iranians are claiming the mathematician as part of their national mythology. She was especially dubious about Rouhani, who was quick to publish a photo of a hijab-less Mirzakhani on Instagram.

“Why didn’t they publish her unveiled picture when she was alive?” Alinejad asked. “Now, when she’s gone, they’re trying to own her, in a fake and disgusting way. They want to publish this to show the world, ‘See, we broke the taboo!’—to use this opportunity to show that they’re moderate.”

Rouhani came under fire from Alinejad and other activists when, in 2014, Mirzakhani’s image was Photoshopped in Iranian newspapers. Alinejad said that her campaign had “named and shamed” the president and the offending media outlets online, and that Rouhani began to feel the heat as he was repeatedly confronted on the compulsory hijab issue over the past few years. In 2015, a journalist in France presented him with one of the My Stealthy Freedom photos and asked if he found it offensive. More recently, at this year’s Oscars, an Iranian TV station’s decision to censor the image of Anousheh Ansari as she accepted The Salesman’s award for Best Foreign Language film ignited social media outrage around the world. The president is facing not only international pressure, but also internal pressure—for instance, in the form of White Wednesday protests, during which women wear white and demonstrate in public against the dress code.

‌ درگذشت اندوه‏بار مریم میرزاخانی، #نابغه نامدار #ریاضی ایران و جهان موجب تأثر فراوان شد. ‌ درخشش بی‌نظیر این #دانشمند خلاق و انسان متواضع که نام ایران را در مجامع علمی جهانی طنین‏‌انداز کرد، نقطه عطفی در معرفی همت والای #زنان و جوانان ایرانی در مسیر کسب قله‌های افتخار در عرصه‌های گوناگون بین‌المللی بود. ‌ این‏جانب ضمن ارج نهادن به خدمات علمی و آثار ماندگار این فرزند فرهیخته ایران، مصیبت وارده را به جامعه علمی کشور و خانواده محترم آن عزیز از دست رفته صمیمانه تسلیت می‏‌گویم. ‌ #مریم_میرزاخانی (۱۳۹۶-۱۳۵۶) #فرزند_ایران ‌

A post shared by Hassan Rouhani • حسن روحانی (@hrouhani) on

The Rouhani government is facing domestic discontent on another front: Iran’s serious brain drain problem. Mirzakhani left to pursue her studies in the United States, just as thousands of Iranians do every year; despite her having spent her career in the U.S., her death now offers Iran’s government and media an opportunity to symbolically reverse that phenomenon by memorializing her as one of their own.

“They feel that their reputation is ruined around the world, and they want to get it back,” Alinejad said. “Maryam is a big name, so they jump on her to make a name for themselves. It’s a sign of hypocrisy. If you really care about freedom of choice, you have to hear your own women who’ve been shouting for years inside Iran, not a person who has died.”

For her part, Esfandiari doesn’t see the media’s shift on Mirzakhani as hypocrisy so much as understandable self-preservation. “I think the newspapers that [covered up Mirzakhani in 2014] thought they were protecting her and protecting themselves,” she said. “They were probably worried that the newspaper would be confiscated and banned. In some cases it’s a kind of self-censorship by the newspapers, because they don’t want to give an excuse for the censors to come.”

Esfandiari added that some Iranian media outlets use the hijab issue as a way to punish women they have incentive to criticize. She cited Shirin Ebadi, who won the Nobel Peace Prize in 2003 for her work on human rights issues, particularly in Iran. “When the conservative press wanted to go after Ebadi, they published a picture of her taken abroad without the hijab,” Esfandiari said. In the case of the beloved Mirzhakhani, however, there is no political incentive to tarnish her, so the conservative papers barely bothered covering her story.

Alinejad said that she considers the less conservative newspapers’ truthful depiction of Mirzhakhani a small step toward women’s equality—and that it’s important to give credit to the vocal activists who protested “Photoshop hijab” until the government and media took notice: “Some people say that it’s an achievement of Maryam’s. I have respect for Maryam and she’s my hero, too. But Maryam Mirzhakhani didn’t protest. Anousheh Ansari didn’t protest either. This was the voice of Iranian women. They were trying to shame the government. And now they have been heard.”  

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.