DUBAI, United Arab Emirates – On his last visit to Iran, Canadian-based blogger Hossein Derakhshan was detained and interrogated, then forced to sign a letter of apology for his blog writings before being allowed to leave the country.
Compared to others, Derakhshan is lucky.
Dozens of Iranian bloggers have faced harassment by the government, been arrested for voicing opposing views, and fled the country in fear of prosecution over the past two years.
In the conservative Islamic Republic, where the government has vast control over newspapers and the airwaves, weblogs are one of the last bastions of free expression, where people can speak openly about everything from sex to the nuclear controversy.
But increasingly, they are coming under threat of censorship.
The Iranian blogging community, known as Weblogistan, is relatively new. It sprang to life in 2001 after hard-liners — fighting back against a reformist president — shut down more than 100 newspapers and magazines and detained writers.
At the time, Derakhshan posted instructions on the Internet in Farsi on how to set up a weblog.
Since then, the community has grown dramatically. Although exact figures are not known, experts estimate there are between 70,000 and 100,000 active weblogs in Iran. The vast majority are in Farsi, but a few are in English.
Overall, the percentage of Iranians now blogging is "gigantic," said Curt Hopkins, director of an online group called the Committee to Protect Bloggers, who lives in Seattle.
"They are a talking people, very intellectual, social, and have a lot to say. And they are up against a small group [in the government] that are trying to shut everyone up," said Hopkins.
To bolster its campaign, the Iranian government has one of the most extensive and sophisticated operations to censor and filter Internet content of any country in the world — second only to China's, Hopkins said.
It also is one of a growing number of Mideast countries that rely on U.S. commercial software to do the filtering, according to a 2004 study by a group called the OpenNet Initiative. The software that Iran uses blocks both internationally hosted sites in English and local sites in Farsi, the study found.
The filtering process is backed by laws that force individuals who subscribe to Internet service providers to sign a promise not to access non-Islamic sites. The same laws also force the providers to install filtering mechanisms.
The filtering "is systematically getting worse," said Derakhshan, who was detained and questioned during a visit to Iran last spring, just before the election of hard-line President Mahmoud Ahmadinejad.
But is the government threatened because the tens of thousands of Iranian blogs are all throwing insults at it, or calling for revolution? Not quite.
The debates on Iranian weblogs are rarely political. The most common issues are cultural, social and sexual.
Blogs also are a good place to chat in a society where young men and women cannot openly date. There are blogs that discuss women's issues, and ones that deal with art and photography.
But in Iran, activists say all debates are equally perceived as a threat by the authorities. Bloggers living in Iran understand that better than anyone else.
"I am very careful. Every blogger in Iran who writes in his/her name must be careful. I know the red lines and I never go beyond them," said Parastoo Dokouhaki, 25, who runs one of Iran's most popular blogs. "And these days, the red lines are getting tighter."
Dokouhaki doesn't directly write about politics. She sticks mostly to social issues, but in Iran, that is also a taboo subject.
"I write about the social consequences of government decisions and they don't like it, because they can't control it," said Dokouhaki.
Outright political bloggers have an even tougher time.
Hanif Mazroui was arrested in 1994 and charged with acting against the Islamic system through his writings. He was jailed for 66 days and then acquitted.
"It's normal for authorities to summon and threaten bloggers," Mazroui said.
The government continued to harass him and three months ago, he was summoned once again by the authorities and told never to write about the nuclear issue. Soon after his release, he shut down his weblog.
"They kept pressuring me," he said.
Arash Sigarchi, an Iranian journalist and blogger, was arrested and charged with insulting the country's leader, collaborating with the enemy, writing propaganda against the Islamic state and encouraging people to jeopardize national security.
He had been in jail for 60 days when he was sentenced to 14 years in prison. He appealed, and was released on bail. Although his sentence has been reduced to three years, he still faces charges of insulting the leader and writing propaganda.
Another, Mojtaba Saminejad, has been in prison since February 2005. He was first arrested in November 2004 for speaking out against the arrest of three colleagues.
According to the Committee to Protect Bloggers, Saminejad's Web site was hacked into by people linked to the Iranian Hezbollah movement.
After his release, he launched his blog at a new address, which led to his second arrest in February 2005. He was sentenced to two years in prison, and then given an extra 10 months for inciting "immorality."
Despite the crackdown, most Iranian bloggers say the government is not interested in eliminating blogging. Instead, they believe authorities want to use blogging to further their own goals.
Farid Pouya, a Belgian-based Iranian blogger, notes the government has just launched a competition for the best four blogs. The subjects: the Islamic revolution and the Koran.
"The government has observed carefully and learned that blogs are important ... and they want to capitalize on that," she said. "They want to lead the movement, they want to control it."