Iran's Supreme Leader Ayatollah Ali Khamenei
Iran's Supreme Leader Ayatollah Ali KhameneiReuters

An Iranian-Canadian blogger who was sentenced to 19 years in prison for his writings has been pardoned by Iran's supreme leader, Ayatollah Ali Khamenei, reports The Associated Press (AP).

The news of the pardon of Hossein Derakhshan, who helped ignite blogging in Iran, was first reported by Iran's semi-official ISNA news agency.

It said authorities informed Derakhshan about his amnesty late Wednesday, when he returned to Tehran's Evin prison from one of his occasional leaves.

"I was released after six years," said a brief message posted on Derakhshan's Google Plus web page. "I thank God. Very grateful to the Ayatollah Khamenei."

The posting also thanked his supporters and his family, including his parents, his brother and sister and his wife.

The ISNA report did not elaborate on the reason for Derakhshan's pardon by Khamenei, but AP noted that Derakhshan's parents have reportedly sent letters to Khamenei seeking their son's pardon.

A spokesman for Canada's Department of Foreign Affairs told Canada’s CBC News that it was "aware of reports that a Canadian citizen has been pardoned in Iran."

Derakhshan moved to Canada in 2000 and studied sociology at the University of Toronto.

The founder of one of the first Farsi-language blogs, Derakhshan was first detained in 2008. In 2010, a court sentenced him to more than 19 years in prison for his writings. The term was later dropped to 17 years.

Writing from Canada, Derakhshan was initially a critic of Iran's clerical leadership. Using his Canadian passport, he visited Israel in 2006, saying he wanted to act as a bridge between the two peoples.

Derakhshan was convicted on charges of co-operation with hostile countries (a reference to the Israel visit), spreading propaganda against the ruling establishment, promotion of counter-revolutionary groups and insulting Islamic thought and religious figures.

He later became a vocal supporter of former president Mahmoud Ahmadinejad, praising him for standing up to the West and criticizing regime opponents.

Iran routinely arrests and sometimes executes bloggers and journalists and is  notorious for its internet censorship. Since the June 2009 post-election uprisings, protesters facing violent retaliation by government forces turned to the internet and social networking sites such as Facebook, Twitter and YouTube, as well as blogging sites, as effective and safer ways to voice political dissent.

The country’s current president, Hassan Rouhani, has indicated, however, that he intends to revise Iran’s censorship policy.

In a speech he delivered a month before being sworn in, Rouhani said that a strong government does not “limit the lives of the people.”

Two weeks after his victory in the elections, Rouhani told a popular Iranian youth magazine that he believed social networking sites such as Facebook were a welcome phenomenon.

At the same time, even under Rouhani, Iran has continued to detain activists accused of providing material to “anti-government websites”.