The arrests took place over the past months, and those taken into custody worked on "sensitive sites" in the country's military and nuclear facilities, an Iranian intelligence official told a press conference in Tehran.
He did not elaborate, say how many of them were sentenced to death or when the sentences were handed down.
President Donald Trump posted on his Twitter account Monday that the Iranian claim was "totally false"
The announcement of the arrests comes as Iran's nuclear deal with world powers is unraveling and tensions have spiked in the Persian Gulf region. The crisis stems from President Donald Trump's decision to pull the United States out of the agreement last year and intensify sanctions on the country.
The Iranian official did not give his name but was identified as the director of the counterespionage department of Iran's Intelligence Ministry. It's rare in Iran for intelligence officials to appear before media, or for any official to give a press conference without identifying himself.
The official claimed that none of the 17, who allegedly had "sophisticated training," had succeeded in their sabotage missions. Their spying missions included collecting information at the facilities where they worked, carrying out technical and intelligence activities, and transferring and installing monitoring devices, he said.
The official further claimed the CIA had promised U.S. visas or jobs in America and that some of the agents had turned and were now working with his department "against the U.S."
He also handed out a CD with a video recording of an alleged foreign female spy working for the CIA. The disc also included names of several U.S. Embassy staff in Turkey, India, Zimbabwe and Austria who Iran claims were in touch with the recruited Iranian spies.
U.S. Secretary of State Mike Pompeo, a former CIA director, declined on Monday to address specifics of the arrests. But he added that "the Iranian regime has a long history of lying."
Pompeo pointed to differences between the U.S. and Iranian accounts of the location of an unmanned U.S. drone the Iranians shot down in June, among other incidents.
"I think everyone should take with a grain of salt everything that the Islamic Republic of Iran asserts today," he said. "They have 40 years of history of them lying, so we should all be cautious reporting things that the Iranian leadership tells us."
Pompeo, speaking to The Associated Press over the phone, said that the world is "watching the Iranian regime understand that they've got a real challenge, that America and the world understands that they are a rogue regime conducting terror campaigns."
Iran occasionally announces the detention of people it says are spying for foreign countries, including the U.S. and Israel. In June, Iran said it executed a former staff member of the Defense Ministry who was convicted of spying for the CIA.
In April, Iran said it uncovered 290 CIA spies both inside and outside the country over the past years.