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.

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, who has final say on all state matters. However, in the past, Derakhshan's parents have reportedly sent letters to Khamenei seeking their son's pardon.

ip-new-derakhshan-facebook

Hossein Derakhshan, who was serving a 17-year prison sentence in Iran for using his blog to create anti-Iranian propaganda, has been pardoned by Ayatollah Ali Khamenei. (Facebook)

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

But François Lasalle said Canada remains concerned about human rights abuses in Iran that target women, religious minorities "or anyone who peacefully exercises their fundamental rights to freedom of speech, assembly and association" and noted that "hundreds remain imprisoned [in] Iran."

"Canada will continue to call on Iranian authorities to respect their international human rights obligations, and meet the international norms of due process and transparency," Lasalle said.

Inspired proliferation of Iranian blogs

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

Derakhshan, the founder of one of the first Farsi-language blogs, 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.

Derakhshan, now 39, helped ignite blogging in Iran by posting online simple instructions on how to create sites in Farsi in 2001, earning the moniker "the Blogfather." The subsequent flourishing of blogs by Iranians at home and abroad gave the country's reform movement a crucial online platform.

Writing from Canada, Derakhshan was initially a critic of Iran's clerical leadership. Using his Canadian passport, he visited Israel, Iran's archenemy, 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.

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

With files from CBC News