The Iranian journalist Niloufar Hamedi specialized in covering women’s issues. So when her editor noticed an Instagram post about a young woman in a hospital in bad shape after being arrested for violating the country’s strict Islamic dress code, Ms. Hamedi headed straight there.
She found relatives of the woman, Mahsa Amini, 22, holding each other tightly in a fluorescent-lit ward inside Tehran’s Kasra Hospital. She snapped a picture and posted it on Twitter — and then it went viral. That was Sept. 16, the day Ms. Amini died.
Antigovernment protests soon spread around Iran, igniting chants of “women, life, freedom,” and they shook the country for many months. But Ms. Hamedi, 30, was not there to witness it: She had been arrested days after Ms. Amini’s death.
A week later, Elaheh Mohammadi, 36 — a journalist who had traveled to Ms. Amini’s hometown, Saghez, to report on her funeral — was also imprisoned. After spending more than eight months in custody, both journalists went on trial last week, charged with conspiring with foreign intelligence agencies to undermine national security.
“They are both full of life and passion, and they were fighting with their journalism to improve women’s lives and status in Iran,” said Amir Hossein, a Tehran-based journalist. “Instead of investigating the causes and the people behind Mahsa Amini’s death,” he added, “the regime began blaming the journalists who brought it to light in the first place.”
“What can I say?” Mr. Hossein said. “That’s the reality of journalism in Iran.”
The protests, which lasted for months, have long since fizzled, dispelled by a violent government crackdown that killed at least 573 people, according to human rights groups. But for many of those involved, an official reckoning goes on: The authorities have executed seven protesters, and at least eight more are on death row. At least 95 journalists have been arrested, according to the Committee to Protect Journalists.
Ms. Hamedi and Ms. Mohammadi have won widespread sympathy and acclaim in the West, even landing a spot in Time magazine’s 100 most influential people this year.
“We rarely hear the details” of the abuses of Iranian citizens by the authorities, the citation read. Because of their reporting, it added, “This time was different.”
Back home, however, Iranian officials made the prosecution of the two women a high priority.
A joint statement by Iran’s powerful Islamic Revolutionary Guards Corps and the Ministry of Intelligence after their arrests accused them of inciting people to protest, claiming that they were agents of enemy countries trained to publish inflammatory reports on Ms. Amini’s death to provoke chaos.
Iran’s supreme leader, Ayatollah Ali Khamenei, called the statement “significant.”
Closed-door trials began for both women last month in revolutionary courts, which the government uses to prosecute sensitive security-related cases. Little information has emerged from the proceedings, but Ms. Hamedi’s husband, Mohamad Hossein Ajorlou, and a lawyer for Ms. Mohammadi have said that the journalists’ lawyers were barred from speaking in their defense.
Mr. Ajorlou, who is also a journalist, said no family members were allowed to attend.
Ms. Hamedi denied the accusations against her in the first trial session, saying she had simply done her job as a journalist, her husband said on Twitter.
More than 500 Iranian journalists have signed a petition calling on the court to respect the women’s legal rights. But many were afraid to speak to The New York Times about their case, and the few who did asked to be identified by only their first names out of concern about government repercussions.
“These two journalists have become icons of professional journalism in Iran in the face of all the restrictions and the censorship,” said Asal, 31, a former reporter for the daily newspaper Shargh, which Ms. Hamedi worked for. “Their imprisonment is not just the imprisonment of two journalists, but the imprisonment of professional journalism in Iran.”
Both reporters had spent years preparing for a moment like Ms. Amini’s death.
Ms. Hamedi, who was born in the northern Iranian city of Babolsar and had a master’s degree in physical education, first worked as a sports reporter. That led her to articles about Iran’s ban on women in sports stadiums, which, in keeping with the government’s rigid insistence on preserving women’s modesty, prevented female fans from watching soccer and other sports in person.
She developed an appetite, and a talent, for articles on women’s rights.
One examined the discrimination, restrictions and domestic violence that had played a part in driving some Iranian women to set themselves on fire. Another delved into Iran’s underground market for illegal abortions and the risks women faced to get them.
Ms. Mohammadi, a native of the city of Shahin Shahr in central Iran, majored in Persian literature as an undergraduate and earned a master’s degree in gender studies. As a journalist for newspapers and news websites, she traveled to some of the remotest parts of the country, interviewing women about their experiences.
Her best-known work described sexual harassment and violence against women.
These days, held in Gharchak-Varamin prison, the women have little to do but knot bracelets of colorful thread for friends and family.
Ms. Mohammadi has lost more than 20 pounds while in detention, according to Instagram posts by her sister Elnaz Mohammadi, but has kept her spirits up.
According to a fellow inmate, Ms. Hamedi keeps busy with yoga, meditation and running, an activity she used to do with her husband.
In January, Mr. Ajorlou tweeted a photograph of his wife smiling over a pan of homemade pizza, along with a recording of a call she had made from prison. She was reading him a diary entry, as she often did, this one about baking a cheesecake for her fellow inmates.
“Here,” she said, “in the prison of Gharchak-Varamin, life still finds its way to us.”
In March, her husband wrote that he had run a marathon in her honor.
“Niloufar believes that enduring prison is like training for a marathon,” he said. “Daily suffering. But imagining the joy of the finish line cancels out all the pain.”
Five months into his wife’s imprisonment, Mr. Ajorlou posted a letter of dismissal he said he had received from IRNA, an Iranian state-owned news agency, after 13 years of working there. The letter, according to a screenshot, said that the agency no longer needed his services.