A hard-line former chief prosecutor of Tehran has been disbarred and banned for five years from all positions in the Iranian government.
The Supreme Court upheld a lower court ruling which found that Saeed Mortazavi ordered the torture of at least three protesters who died in custody in 2009.
He rejected the accusations. Until his trial last year, he was head of Iran's social welfare organisation.
Mr Mortazavi, 46, has been fiercely criticised by reformists.
He played a dominant role in the judiciary from 2003 when he was appointed chief prosecutor general Tehran until 2009, when the government put down student protests against the controversial re-election of President Mahmoud Ahmadinejad.
Mortazavi was put on trial last year over charges of ordering the torture of three protesters who died in prison.
Correspondents say his sentence was seen by many reformists as derisory.
Iran's presidency has been held since August 2013 by Hassan Rouhani, a moderate.