Iran's claims that it broke up a CIA spying ring have been dismissed as "totally false" by Donald Trump.
Tehran also said it had sentenced some of the 17 suspects to death.
But the US president said the allegations contained "zero truth".
Mr Trump tweeted: "The report of Iran capturing CIA spies is totally false. Zero truth".
He added it was "just more lies and propaganda put out by a religious regime that is badly failing and has no idea what to do".
He said the Iranian economy was "dead and will get much worse", and described the county as a "total mess".
According to a statement from Iran's intelligence ministry, read on state TV, the alleged spies were "employed in sensitive and vital private sector centres in the economic, nuclear, infrastructural, military and cyber areas... where they collected classified information".
Suspects were arrested during previous months, an Iranian intelligence official told a press conference.
He did not say how many had been sentenced to death, and did not give his name, which is unusual.
Reporters were told, however, that he was the director of the counter-espionage department at Iran's intelligence ministry.
None of the suspected spies succeeded in their sabotage missions, he added, claiming that some of them had turned and were now working with his department against the United States.
Iran also aired a TV documentary purportedly showing a CIA officer recruiting an Iranian man in the United Arab Emirates.
In the film, a woman who speaks Persian with what appears to be an American accent says: "There are so many intelligence officers in Dubai. It is very dangerous... Iranian intelligence."
Last month, Iran said it had exposed a large cyber espionage network it alleged was run by the CIA - although it is unclear whether this latest development is linked to that.
Spies had been arrested in different countries, it claimed.
US Secretary of State Mike Pompeo said the "Iranian regime has a long history of lying", adding: "I would take with a significant grain of salt any Iranian assertion about actions that they've taken."
There have been months of increasing tension between Iran and the West since tighter US sanctions came into effect at the start of May.
On Saturday, Iran released a video which it claimed disproved Donald Trump's claim that a US warship destroyed an Iranian drone.
The American president said the USS Boxer took "defensive action" on Thursday after the drone ignored repeated warnings and came within 1,000 yards of the ship in the Strait of Hormuz.
But Iranian state TV aired video it said was taken by the drone on Thursday of USS Boxer and another American warship.
There have also been increased tensions between the UK and Iran, after a British-flagged oil tanker, the Stena Impero, was seized in the Strait of Hormuz.
Iran has linked its capture of the vessel with Britain's role in detaining a tanker carrying Iranian oil earlier this month.
Theresa May has chaired a meeting of the government's emergency cobra committee to discuss Britain's response.
The prime minister's official spokesman said: "We do not seek confrontation with Iran but it is unacceptable and highly escalatory to seize a ship going about legitimate business through internationally recognised shipping lanes."
The spokesman added that the Stena Impero had been seized under "false and illegal pretences and the Iranians should release it and its crew immediately".