Tehran's ex-prosecutor and controversial ally of President Mahmoud Ahmadinejad was released from the notorious Evin prison on Wednesday after almost two days in detention, Iranian media reported.
The reports did not elaborate on the circumstances of Saeed Mortazavi's release nor of his arrest on Monday night when he was sent to Evin, where many political prisoners and journalists have been imprisoned over years on his orders.
Mortazavi's detention, amid a brewing political fight between state branches, was criticised by Ahmadinejad as a "very ugly action".
Despite strong opposition from the parliament, Mortazavi is caretaker of Iran's wealthy social welfare organisation. Before his post there, the 55-year old was in charge of Iran's task force against smuggling.
But he is best known for his seven-year tenure as Tehran's prosecutor until August 2010, when he was suspended as a judge after a parliamentary probe found him responsible for sending anti-government protesters to Kahrizak, a detention centre south of Tehran.
Three protesters died in prison there, in the aftermath of the disputed 2009 presidential election that re-elected Ahmadinejad.
Mortazavi is also targeted by US sanctions over "sustained and severe violations of human rights" as prosecutor.
He was at the centre of a raucous parliamentary session on Sunday, which led to the impeachment of labour and social welfare minister Abdolreza Sheikholeslam for refusing to sack Mortazavi.
At the session, Ahmadinejad while defending his ally accused speaker Ali Larijani and his family of nepotism and corruption.
Larijani in return accused Ahmadinejad of impeding justice by shielding his inner circle from judicial probes.