According to the director general of the counterespionage department of the Intelligence Ministry, as cited by the Iranian Tasnim, once agents detected the CIA spies, they would detain some and recruit them to work for Iran.
The official added that a number of the detected spies had been identified as Iranians charged with committing treason by cooperating with the CIA.
Shamkhani also said that once the CIA had realized their network was compromised, it tried to retrieve all of its active spies from Iran, which resulted in the termination of the cyberespionage network in the country.
The United States has not yet commented on the situation.
This comes after the secretary of Iran's Supreme National Security Council, Ali Shamkhani, said on Monday that intelligence services had finally caught a network of cyberspies that was working for the CIA. He also said that Iran had shared information about its counterespionage efforts with other countries, resulting in the identification and detention of a number of spies abroad.
Relations between the United States and Iran have become increasingly hostile since last year when the United States unilaterally withdrew from the 2015 Iran nuclear deal and began reimposing sanctions on the Islamic republic.