(Adds Ahmadinejad's response)
DUBAI, Feb 5 (Reuters) - A former Iranian prosecutor linked to the deaths of anti-government protesters and at the centre of a power struggle between the country's president and parliamentary speaker has been arrested, the Tehran prosecutor's office said.
No reason was given for the arrest of Saeed Mortazavi, who has played a central role in stamping out dissent following the disputed reelection of President Mahmoud Ahmadinejad in 2009, and been described by Human Rights Watch as a "serial human rights abuser".
But the timing suggested it might be linked to his role in the dispute between Ahmadinejad - who is travelling to a summit in Egypt - and Parliament Speaker Ali Larijani, which has intensified with the approach of presidential elections.
The president was quoted as describing Mortazavi's detention as "very ugly" and saying it would be investigated on his return.
"The Tehran prosecutor announced Monday night that Saeed Mortazavi has been arrested," read a one-line statement from the prosecutor's office.
Iran's Fars news agency reported Mortazavi was taken to Evin Prison, and said he was arrested as he was leaving work.
Mortazavi was suspended from his judicial post over the deaths by torture of three protesters in custody after the 2009 presidential election, which the opposition claimed was rigged in Ahmadinejad's favour, bringing huge crowds into the streets.
Fars said Mortazavi's arrest on Monday could be linked to his involvement in the prison deaths. The spokesman for Iran's judiciary, Gholamhossein Mohseni-Ejei, said in January that Iran's court would address the cases in March.
But Mortazavi's name surfaced in another context on Sunday, when Ahmadinejad accused the parliament speaker's family of corruption, deepening a long-standing rivalry between the two.
In a speech meant to defend one of his ministers against impeachment, Ahmadinejad played a tape he said showed a meeting between Speaker Ali Larijani's brother Fazel and Mortazavi in which Fazel Larijani attempted to use his family's prominent political status for financial gain.
Both Fazel and Ali Larijani denied the accusation of corruption, and Fazel Larijani said he would file a legal complaint against Ahmadinejad and Mortazavi. The head of Iran's judiciary is Sadeq Larijani, Fazel and Ali's brother.
"The judiciary is not a special family organisation," Ahmadinejad said, according to state news agency IRNA, an apparent reference to the deep influence of the Larijani family in Iran's power structure.
"I don't know how it has happened that one person has committed an infraction, and another person is arrested," he said. "Instead of going after the violator, they go after the person who has announced the violation, and this is very ugly."
Deep divisions remain within the highest levels of Iran's ruling class despite calls from Supreme Leader Ayatollah Ali Khamenei for officials to stop bickering and show unity ahead of presidential elections scheduled for June.
Labour Minister Abdolreza Sheikholeslami, who was dismissed by parliament on Sunday, appointed Mortazavi last year to head the social security office, despite lawmakers' anger.
Dubbed by some as "the butcher of the press," Mortazavi had a central role in shutting down reformist newspapers and arresting dozens of journalists.
"Over the last decade, his (Mortazavi's) name has been closely linked to most, if not all, of Iran's human rights related imbroglios," said Yasmin Alem, a U.S.-based expert on Iran's electoral system.
"Now, he is at the crux of a political fiasco that has brought all the regime's dark secrets to the surface." (Reporting by Yeganeh Torbati; Editing by John Stonestreet)