Tehran (AFP) - Mahmoud Hashemi Shahroudi, a grand ayatollah who headed Iran's judiciary during fierce crackdowns on dissidents, journalists and activists, died on Monday at the age of 70 according to the state news agency IRNA.

Shahroudi was a student of Iran's revolutionary founder Ruhollah Khomeini who went on to hold some of the most powerful positions in the Islamic republic.

At the time of his death he was head of the Expediency Council and a member of the 12-man Guardian Council -- two key institutions in shaping legislation and vetting election candidates.

He was also deputy head of the Assembly of Experts which has the power to choose the successor to supreme leader Ayatollah Ali Khamenei -- a position to which Shahroudi himself was occasionally linked.

Shahroudi had not been seen in public for several months, and there were reports last year that he underwent surgery for an unspecified cancer in Germany.

A German lawmaker filed a complaint against Shahroudi during his stay, calling for him to be charged for crimes against humanity, but a judge found no grounds to hold him.

Shahroudi headed the judiciary between 1999 and 2009 -- a period that saw hundreds of executions and a concerted crackdown on activists, dissidents and the reformist media.

His tenure concluded with the mass protests over allegations of rigging in the 2009 presidential election, which led to thousands being arrested and allegations of severe prisoner abuse.

Some measures nonetheless marked him as a relative moderate within the judiciary, particularly his moratorium on stoning as a method of execution which other clerics saw as sanctioned under sharia law.

But the prosecution in 2001 of reformist lawmakers -- despite their parliamentary immunity -- was heavily criticised by the government of the time.

Shahroudi was born in Najaf in Iraq on August 18, 1948, and met Khomeini when the latter was exiled to Iraq in the 1960s.

He fled to Kuwait and then Iran after Iraqi dictator Saddam Hussein cracked down on Shiite clerics in the wake of the 1979 Iranian revolution, the conservative Tasnim news agency said in its obituary.