Alavi said the eight were "Takfiri" foreigners, some of whom were linked to a "Takfiri" leader who had been killed in Iran, IRNA reported. He did not give details of which countries they were from.
"Takfiri" is a word used by predominantly Shi'ite Muslim Iran to refer to hardline, armed, Sunni militant groups.
No casualties: Iranian forces fire mortar shells
"Initial information indicates that Kalashnikovs and other equipment were obtained to carry out terrorist operations ... in Tehran and several other cities under the direct guidance of persons based in neighbouring countries," Alavi was quoted by the state news agency IRNA as saying.
In August, Alavi said the leader of a Sunni militant group in southeast Iran responsible for attacks against security forces and civilian targets has been killed, although it was not immediately clear if he was person he suspected those arrested of being linked to.
Although Alavi did not identify which country Iran suspected of guiding the suspects, Iranian officials often accuse regional rival Saudi Arabia of backing ultrahardline Sunni militant group Islamic State.
Russia says no substantial difference with USA over Iran: RIA
Riyadh denies the charges and says Tehran destabilizes the region and sponsors terrorism, an accusation rejected by Iran.
On Friday, Iran's prosecutor-general Mohammad Jafar Montazeri said security forces had smashed a cell linked to Islamic State near Tehran that wanted to "sabotage" rallies on Friday marking the anniversary of the 1979 Islamic Revolution that toppled the U.S.-backed Shah.
Iranian security forces have repeatedly announced arrests of Islamic State fighters and sympathizers.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ