The men were found guilty of aiding five militants who attacked the parliament and Ayatollah Ruhollah Khomeini's mausoleum. Eighteen people died in the assault last year.
An Iranian court on Sunday sentenced eight men to death over attacks claimed by the "Islamic State" last June.
The men were found guilty of helping the five terrorists who attacked the parliament and a shrine to Iran's revolutionary leader, Ayatollah Ruhollah Khomeini, the head of the Tehran Revolutionary Courts, Mousa Ghazanfarabadi, told state TV.
Ghazanfarabadi said the sentence could be appealed within 20 days in Iran's Supreme Court.
A further 18 people face trial over the attacks, according to the court's director.
Eighteen people died and more than 50 were wounded when suicide bombers and gunmen launched the assault on the parliament and Khomeini's mausoleum in Tehran. IS claimed responsibility for the attack.
Security forces killed all the attackers. Iran said the assailants had fought for IS in Syria and Iraq.
Ghazanfarabadi said courts will later hear claims filed by families of the victims against the United States and Saudi Arabia, whom predominantly Shiite Muslim Iran accuses of supporting the IS, a Sunni Muslim militant group. Both countries deny that accusation.
ap/jm (AP, Reuters)