The suspects were detained in Alborz province, north of Tehran, Ahmed Fazelian, a spokesman for the province's prosecution, told the official IRNA news agency.
On Friday, Iran's Intelligence Ministry said since the attack on Wednesday security forces have arrested 41 individuals linked to the Islamic State (IS) in Tehran, Kermanshah, Kurdistan and West Azarbaijan provinces.
The group said it would target Iran's Shia majority in what appeared to be filmed footage before the gun and suicide bomb attacks on the Iranian parliament and the Mausoleum of Ayatollah Ruhollah Khomeini on Wednesday.
The mastermind of the Tehran attacks has been killed Saturday outside of Iran in an Iranian-led operation in coordination with the intelligence of "a friendly foreign country", Iran's intelligence minister has said. Find us on Facebook too!
Supreme leader Ali Khamenei said the attacks "will not damage the Iranian nation's determination, and the obvious result is nothing except an increase in hate for the governments of the United States and their stooges in the region like Saudi".
Thousands filled the streets of the capital Friday to mourn 17 victims of two attacks this week by Islamic State militants, the first time in recent memory Sunni jihadists managed to strike the heart of the Shiite Islamic Republic.
The Intelligence Ministry also confirmed that five of the men involved in the attacks had previously fought for the Islamic State group.
At the end of the video, he sent a message to the Saudi government.
On Friday, the US embassy in Saudi Arabia issued a security notice to USA citizens recommending that they "exercise caution in places frequented by foreigners due to the continuing risk of terrorist attacks. across the Kingdom".
As the funerals took place, Iranian authorities continued a widening crackdown.
At a ceremony held in parliament, attended by newly re-elected moderate President Hassan Rouhani, speaker Ali Larijani also attacked the United States and Saudi Arabia.
Three members of Iran's Islamic Revolutionary Guard Corps stood at every metro station entrance, checking bags and keeping an eye out for suspicious people.