TEHRAN, Iran-- An Iranian court sentenced the founder of one of the first Farsi-language blogs, credited with sparking the boom in Iranian reform bloggers, to more than 19 years in prison for his writings, a news web site reported Tuesday.

Iranian-Canadian Hossein Derakhshan, 35, was a controversial figure among Iran's blogging community. Writing his blog from Canada, he was initially a critic of Iran's clerical leadership, and in 2006 he visited Israel -- Iran's archenemy -- saying he wanted to act as a bridge between the two countries' peoples.

But he later became a vocal supporter of hard-line President Mahmoud Ahmadinejad, praising him for standing up to the West and criticizing regime opponents. Derakhshan then visited Iran in 2008 and was arrested. Over the next two years, he was often held without communication with family or lawyers, according to rights groups.

Mashreghnews.ir, which is close to Iran's presidential office, reported on Tuesday that Derakhshan was convicted on charges of cooperation with hostile countries -- a reference to the Israel visit -- spreading propaganda against the ruling establishment, promotion of counterrevolutionary groups and insulting Islamic thought and religious figures.

The court sentenced him to 19 1/2 years in prison, the report said, adding that Derakhshan can appeal. It was unclear if he would benefit from time served.

Derakhshan helped ignite blogging in Iran by posting simple instructions online on how to create sites in Farsi in 2001. The flourishing of blogs by Iranians at home and abroad that resulted gave the country's reform movement an online platform that has helped it survive heavy crackdowns at home -- though authorities tried to block many, including Derakhshan's.

His later embrace of Ahmadinejad angered many reform bloggers. Before returning to Iran, Derakhshan on his blog dismissed worries he could be arrested for his previous writings.

The Iranian government has stepped up its crackdown on opponents since Ahmadinejad's 2009 re-election, which opponents say he won by fraud, a claim the president denies.

Authorities shut down two pro-reform newspapers -- Andisheh-e No daily and Bahar Zanjan -- for publishing articles in which they had insulted officials, another newspaper, Shargh, reported Tuesday. They were the latest in a string of newspapers to be banned since the election.