Nazila Fathi covered turbulent events in her native Iran for years as The New York Times correspondent. She learned to navigate the complicated system that tolerates reporting on many topics but can also toss reporters in jail if they step across a line never explicitly defined by the country's Islamic authorities.
Fathi recalls one editor telling her what journalists could do in Iran: "We have the freedom to say whatever we want to say, but we don't know what happens afterwards."
Five years ago, Fathi was covering the aftermath of Iran's hotly contested 2009 presidential election, when demonstrators flooded the streets to protest a vote they said was rigged in favor of the incumbent, Mahmoud Ahmadinejad. The government warned journalists to stop covering the street demonstrations, which often turned violent, but Fathi continued to file stories for the Times.
Then one day, a government source told her that the authorities had given her photo to snipers who were believed to be shooting the protesters. Soon after, intelligence officials appeared on the street outside her apartment.
Fearing arrest, she remained in her apartment until she and her husband, along with their two small children, left for the Tehran airport in the middle of the night and took a flight out of the country.
Fathi has not gone back to Iran and now lives in suburban Washington, D.C. She's written about the challenges of reporting in Iran in a new book, The Lonely War: One Woman's Account Of The Struggle For Modern Iran.
Speaking with NPR's Steve Inskeep, Fathi says she believes that some journalists are arrested not for their reporting, but to serve as a pawn in a complex power struggle. It could involve Iran and a foreign country or it could be an internal feud between two Iranian government agencies, she says.
Here are the highlights of the interview:
Was the government monitoring you because you were a journalist?
Yes, from the beginning. There was a guy, who I call Mr. X in the book, he became my handler. He was the handler of all foreign reporters. Some of my [journalist] friends had very bad experiences with him. I can't say I got along with him, but I found a way to deal with him in a way that he was never mean to me, and I think toward the end, he was even quite respectful.
Where did you meet with Mr. X?
At different places. The first time it was at one of the Intelligence Ministry headquarters. Then he started inviting me to meet him at hotel rooms, which was extremely creepy in the beginning. I was terrified.
[Later, Mr. X invited her to an apartment.] When I went there, I searched the entire house and I went into the kitchen and I took a knife and I hid it in my pocket. I was so embarrassed when I walked in because I kept thinking, "How was I going to use that knife."
I wrote under very tight deadlines, so I just didn't have time to think about him. But when he called and summoned me, he always came with a big file. So there were always questions about the stories I had written.
"Why did you draw this conclusion? Why did you write this?" But the good thing about Mr. X, or at least the way he treated me, was he listened.
Why did you think you had to leave Iran?
It was about 2 1/2 weeks after the [presidential] election in 2009. All reporters received a letter that said the ones who worked out of an office were not allowed to leave their offices. I worked out of home, so I ignored the ban, I kept going out, and of course I was writing my stories under my byline, and I think that embarrassed the regime.
One day I got a call from a [militia] commander. ... He said that he had heard they had given my photo to snipers to shoot me if they saw me. I continued covering the story and I sort of ignored what he had said.
But then I was on my way to see a [political] analyst and I noticed there were people right outside my apartment building sitting in a car and as soon as they saw me, I noticed another car behind me and two motorcycles. I went back home and I never left my apartment building until the night that we left the country.
After I left the country, I found out that the Intelligence Ministry and people in the judiciary were quite divided over whether they should arrest me or not. So it had taken them a while to issue an arrest warrant for me.
You've said there's a lot of free expression in Iran but that there are things you can't write about. What's going on there?
I've always wondered, how come this regime, after 35 years — despite all its efforts, all the money it has spent, all the repressive measures that it has taken — how come it hasn't been able to raise the ideological generation that it desired.
I don't know. That's my question too. Iran has changed in very important ways, and the  revolution has been responsible for it. It was the revolution that drew people who lived on the margins of society, people who were in the rural areas, into the center, because they were the regime's support base. It rewarded them by giving them jobs, by giving them good salaries, and they moved up in society. And they are exactly the same people who are calling for change and reform now.