Mr. Maleki was covering a demonstration on June 20 when he and dozens of protesters were chased by members of the Basij paramilitary force. They fled to an apartment building, where Mr. Maleki had enough time to hide his camera inside a chimney before members of the militia arrested them. He was jailed with hundreds of others for a day. Without his camera, authorities could not identify him as a photographer, but they recorded his national identity number.

Image Ehsan Maleki, a photographer, is one of many journalists leaving Iran in the wake of the disputed June presidential election. Credit... Ehsan Maleki

Mr. Maleki never went home. A few days later a neighbor told him that his house had been ransacked and that his computer and personal documents, including his passport, had been taken. “They found out that I was sending pictures to Sipa,” he said, referring to an international photo agency.

He said he slept in a different place every night and continued to take photos of the protests, but finally decided it was too risky to stay. He paid $150 to a smuggler who drove him to Kheneryeh, near the border with Turkey and Iraq. Accompanied by a Kurdish guide, he crawled among a large herd of sheep for half an hour until they crossed the Iranian border and reached a steep cliff.

“It took us seven hours to climb down and reach a road in northern Iraq,” he said in a telephone interview from Iraq. He would not disclose which city he was in for security reasons.

The journalists leaving Iran come from a range of news organizations, not just those sympathetic to the opposition. A Web site supportive of Mr. Ahmadinejad, Parcham.ir, reported last week that two journalists for state-run television had defected to Italy and Britain. At least two photographers who worked for Fars have also left. Among the journalists who have left is this reporter, who covered the election and subsequent protests before leaving Iran in early July because she felt her safety was threatened.

The exact number of journalists who have left is not clear. Some worry that their families could be harassed if the government learns they are gone. Others are reluctant to reveal their locations in neighboring countries like Turkey and Iraq, fearing that government agents might find them and return them to Iran. Javad Moghimi, a photographer who worked for Fars, acknowledged that he became emotionally invested in the protests.

“The protesters were young, just like me,” Mr. Moghimi, 24, said in a telephone interview from Turkey. “It was impossible to be indifferent. I felt it was my duty to take pictures and reflect their voices abroad.”