(Reuters) - Former Tehran prosecutor general Saeed Mortazavi, whose role in curbing dissent has been condemned by human rights groups for years, has been sentenced to 135 lashes on charges related to a corruption trial, Iranian media reported on Wednesday.

Mortazavi was convicted of "seizing and wasting public funds” while head of the Social Security Organization, an Iranian NGO that provides insurance for the elderly, unemployed and others, in 2012 and 2013, according to state TV's website.

The sentence marked a dramatic reversal of fortune for a man who once personified the heavy hand of the Islamic Republic's hardline judiciary. In 2010, Human Rights Watch described Mortazavi as a "serial human rights abuser".

Mostafa Turk Hamedani, an attorney for the plaintiffs in the Social Security Organization case, said on Wednesday the sentence was too light for the charges Mortazavi faced.

"With respect to the opinion of the judge I am going to file a complaint with the judiciary,” he said, according to state television's website.

Mortazavi, 49, served as prosecutor general in Tehran from 2003 until 2009 and was the head of the capital's Revolutionary Court for a few years prior to that posting.

He first gained widespread attention in the early 2000s for his role in closing dozens of reformist newspapers while heading up the revolutionary court during the reformist presidency of Mohammad Khatami, who was despised by Iranian conservative hardliners for trying to liberalize the Islamic Republic.

Zahra Kazemi, an Iranian-Canadian photo journalist, died in Tehran’s Evin prison in 2003 in the midst of this crackdown on critical media. The Canadian government said Kazemi was tortured to death and accused Mortazavi of direct involvement. 

During Mortazavi’s tenure, three detainees were killed and many tortured in Kahrizak prison in 2009, according to human rights campaigners. The three had been jailed for taking part in street unrest over allegations of fraud in the re-election of then-president Mahmoud Ahmadinejad, a Mortazavi ally. 

Mortazavi was acquitted of charges related to the deaths of the three Kahrizak prisoners in 2014 but banned from holding public office for five years.

Mortavazi was also involved by extension in a protracted feud between Ahmadinejad and the prominent Larijani family. 

In 2013, Ahmadinejad played an audio clip in the Iranian parliament in which the brother of parliament speaker Ali Larijani allegedly offers a bribe to Mortazavi. Sadeq Amoli Larijani, another brother, is the head of the judiciary.

Mortazavi was arrested on the day Ahmadinejad played the audio clip but freed after two days, without explanation.

(Reporting by Babak Dehghanpisheh; editing by Mark Heinrich)