By Babak Dehghanpisheh

BEIRUT, April 4 (Reuters) - Hengameh Shahidi knew the security agents were coming for her. An Iranian journalist and activist, she had been tipped off by contacts close to the government and prepared letters for her family to post on social media in case of her arrest, which happened on March 9.

In a hand-written letter posted on Instagram two days later, Shahidi, 41, wrote that her arrest was part of a "project before the elections for the widespread arrest of political activists and journalists in order to secure votes for the candidate of their choice".

When Iranians vote for president in May, the election will not only decide whether pragmatic President Hassan Rouhani can remain in power, it will also test his ability to protect his own supporters from a hardline state.

Rouhani, 68, was elected in a landslide in 2013 on a promise to reduce Iran's international isolation and increase freedoms for its people. But Rouhani's ability to deliver on his promises is limited in a country where the power of the elected government is constrained by unelected hardline authorities.

The Iranian judiciary has not announced any charges against Shahidi. She began a hunger strike immediately after her arrest, and her health situation has dramatically deteriorated in recent days. In a letter posted on Twitter last weekend Shahidi wrote that she can move around her cell only by crawling. She said she was only four or five days away from death.

"If I die I won't accept any accusation or crime because I haven't done anything," she wrote.

Since late December, at least 22 journalists and activists have been arrested, according to the Center for Human Rights in Iran, a New York-based research and advocacy organisation. Many are being kept in solitary confinement without access to their family or lawyers.

"It's definitely related to elections," said Hadi Ghaemi, the director of the Center for Human Rights in Iran, of the latest wave of arrests. "Almost all of the people who are being detained and interrogated are people who could have an active role in mobilising the electorate to come out and vote, which would most likely be supporting Rouhani's re-election."

About a dozen of those arrested have been administrators of pro-reformist channels on Telegram, a social media platform used by millions of Iranians. They were rounded up in mid-March, though some were subsequently released.

Ghaemi said reformist Telegram channels had attracted the ire of the authorities after lobbying last year for voters to reject hardline candidates during elections for parliament and for the body that would select the successor to Supreme Leader Ayatollah Ali Khamenei.

"The intelligence and security apparatus really took notice of the power of Telegram to connect people and mobilise them," Ghaemi said. He added: "They are cracking down on its impact during this election."



"SUSPICIOUS ARRESTS"

In a letter to Rouhani in mid-March, reported by the Iranian Students' News Agency (ISNA), four reformist lawmakers demanded the president explain who was behind the wave of arrests.

"The real question", they wrote, is whether the body responsible for the arrests "is the ministry of intelligence or another, which, in any case, you must be the one to answer."

Last week, Rouhani asked the minister of interior at a cabinet meeting to look into the "suspicious arrests of a number of media activists", according to ISNA.

In her letter written before her arrest, Shahidi compared the crackdown to the disputed 2009 presidential election which kept hardline President Mahmoud Ahmadinejad in office for a second term.

That vote led to the most widespread unrest since the founding of the Islamic Republic, with hundreds of people arrested and dozens killed. Ahmadinejad's reformist challengers, Mir-Hossein Mousavi and Mehdi Karroubi, have been under house arrest since 2011 as Iran's two highest-profile political prisoners, and the inability of Rouhani to deliver their freedom is a disappointment for reformers who supported him in 2013.

Shahidi, who wrote about domestic politics and women's rights issues as a journalist, worked for Karroubi as an advisor and was jailed for several months during the 2009 crackdown.

Human rights activists say Rouhani's administration has been more focused on his mission to reduce Iran's international isolation and improve its economy than on securing domestic reform or freeing political prisoners.

Rouhani's biggest achievement was a 2015 deal with Western powers that led to the lifting of most international financial sanctions in exchange for curbs on Iran's nuclear programme. His government is focused now on demonstrating that the deal will bring economic benefits, which have so far been slow to arrive.

"Rouhani hasn't been wiling to stand up for political freedom in fear that it might jeopardise his economic plans," said Tara Sepehri Far, Iran researcher at Human Rights Watch. She added: "Rouhani and his administration are not willing to stand up to hardliners at the price of confrontation."

In early January, dozens of people gathered for a rare protest outside the Evin prison in Tehran to show solidarity with Arash Sadeghi, who had been on hunger strike for more than two months to protest against the arrest of his wife, a fellow activist. Videos of the protest were posted on YouTube.

Meanwhile, Shahidi's health continues to deteriorate, according to her family. In a letter to Rouhani posted on Instagram in mid-March, she accused the president of failing to fulfil his promises.

"You were supposed be a breath of air for the reformists after the suffocation of the Ahmadinejad days," Shahidi wrote. "Not to cut off their breath like Ahmadinejad, just to reach the presidency."

(Reporting by Babak Dehghanpisheh; editing by Peter Graff) ((babak.dehghanpisheh@thomsonreuters.com;))