Iranians rally in Tehran to denounce a mass shooting at a key shrine that killed more than a dozen worshippers in Shiraz. AFP
The pair were convicted of assisting in "corruption on earth, armed rebellion and acting against national security", the judiciary's Mizan Online website reported, citing Kazem Moussavi, the chief justice of Fars province.
Moussavi said they "were directly involved in the arming, procurement, logistics and guidance of the main perpetrator of the terrorist attack" on the Shah Cheragh mausoleum on October 26 that killed 13 people and wounded 30 others.
Three other defendants in the case were sentenced to prison for five, 15 and 25 years for being members of the Sunni Muslim extremist Islamic State (IS) group, he said.
The verdicts against the five could be appealed before the supreme court, he added.
The main perpetrator of the attack, identified by media outlets in Iran as Hamed Badakhshan, died of injuries suffered during his arrest, Mizan said.
In November, the Islamic republic said 26 "takfiri terrorists" from Afghanistan, Azerbaijan and Tajikistan had been arrested in connection to the attack.
In Shiite-dominated Iran, The term takfiri generally refers to jihadists or proponents of radical Sunni Islam.