The country's Supreme Leader said the attacks will add to the hatred that Iranians harbor toward the USA and Saudi Arabia.
(AP Photo/Fars News Agency, Omid Vahabzadeh).
Iranian leaders sought to play down the attacks, with supreme leader Ayatollah Ali Khamenei saying: "These firecrackers that happened today will not have the slightest effect on the will of the people".
In the midst of the unfolding attacks, the ministry said a third team had been stopped before the attacks started, but no further details have since been given.
The Iranian speaker also criticized the US administration for its support to Saudi Arabia, saying that Washington has undermined democracy and human rights by an alliance with Riyadh.
The ministry did not identify the men's hometowns, nor say how they were able to evade authorities.
Six people including a woman have also been arrested in connection to the attack.
Earlier on Thursday, as dawn broke, commuters in the Iranian capital noticed increased numbers of police on street corners and motorcycles. "Our country is the safest place in the region", a middle-age man told state TV. "If we do not go there, Daesh will be emboldened", he said.
"This terrorist act took place a week after a joint meeting between the United States president and head of a reactionary regional country [Saudi Arabia] which has been a constant supporter of terrorism".
The White House released a statement from Trump condemning the terrorist attacks in Tehran and offering condolences, but also implying that Iran is itself a sponsor of terrorism.
Also Friday, Iranian officials continued a crackdown that followed the attacks. The US decision was confirmed on the same day as the Tehran attacks. "Iranian people reject such US claims of friendship", he added on Twitter.
The Revolutionary Guard Corps, meanwhile, has accused Saudi Arabia and the USA of standing behind Wednesday's deadly attacks.
With Zarif's tweet, the Islamic Revolution Guards Corps (IRGC) vowed to retaliate terrorist attacks in the capital and accused Riyadh of being behind the attacks.
On Thursday, Iran's Intelligence Minister Mahmoud Alavai said investigators were working to determine whether Saudi Arabia had a role Wednesday's attacks but said it was too soon to say if that was the case.
The "spilled blood of the innocent will not remain unavenged", the Revolutionary Guard statement said.
Iran blamed the Wednesday attacks on Saudi Arabia, though no link has been established.
The Trump administration has taken a much harder line toward Iran than its predecessor, describing it as the top state sponsor of terrorism in the world and backing the view of allies Israel and Saudi Arabia that Iran is the chief threat to stability in the region. Iran also has been fiercely opposed to the militant group.
"I am sure Persian Gulf Arab countries are behind this", said Nahid Ghanbari, a 21-year-old university student studying accounting.
Iranians will likely "view this as an attempt to test and weaken Iran, to show that they are vulnerable inside their borders", Handjani said. They never named the country directly, but the implication was clear.
The attack appears to be inflaming the enmity between the countries.
He added the Iranian nation will move forward "unitedly and with great determination". Equipped with AK-47 assault rifles, handguns, grenades and suicide vests, the gunmen killed security guards and ordinary people before holding people hostage in the upper floors of the building.
Two teams of attackers armed with guns and explosives targeted the Parliament building and the mausoleum in apparently coordinated attacks that occurred within an hour of each other. The revered shrine was not damaged.