Iran has detected a planned "massive cyber attack" against its nuclear facilities, state television said on Thursday.
Iran's Intelligence Minister Heydar Moslehi said the US, Israel and Britain had planned the attack.
The alleged attack came after recent talks with major powers failed to resolve a row over Tehran's disputed nuclear activities.
"Based on obtained information, America and the Zionist regime (Israel) along with the MI6 planned an operation to launch a massive cyber attack against Iran's facilities following the meeting between Iran and the P5+1 in Moscow," Iran's English-language Press TV quoted Moslehi as saying.
"They still seek to carry out the plan, but we have taken necessary measures."
It is unclear what virus is to blame for the latest attack, but security experts have pointed to increasing activity from the Flame virus, believed to have infected computers in Iran and other Middle Eastern countries up to five years ago.
Iranian officials were quick to say the country had defeated the virus, capable of snatching data and eavesdropping on computer users.
Iran has been locked in a row for nearly a decade with Western countries over its disputed nuclear program, which the West believes is aimed at making nuclear weapons.
Tehran denies the charge, saying it only wants peaceful nuclear technology to generate.
The program came under attack in 2010 by the Stuxnet computer worm which caused centrifuges to fail at the main enrichment facility. Tehran accused the US and Israel of deploying Stuxnet, later confirmed by The New York Times.
The newspaper reported former and current US officials as saying the cyberattack program had begun under former US President George W. Bush, but accelerated by current president Barack Obama in 2009.
Talks last Tuesday failed to secure a new agreement surrounding the program, despite the threat of a new Middle East conflict if diplomacy collapses.
European Union foreign policy chief Catherine Ashton said significant differences remained and the two sides had agreed only on a technical follow-up meeting in Istanbul on July 3.
Researchers at anti-virus company Symantec have estimated the Flame virus may have been used as late as April.
They said the virus was not only capable of espionage but also sabotaging computer systems.
Iran had previously blamed Flame for causing data loss on computers in the country's main oil export terminal and Oil Ministry. But prior to Symantec's discovery, cyber experts had only unearthed evidence that proved Flame could spy on conversations on the computers it infects and steal data.
Symantec researcher Vikram Thakur said on Thursday that the company had now identified a component of Flame that allows operators to delete files from computers, which means it can cause critical programs to fail or completely disable operating systems.
"These guys have the capability to delete everything on the computer," Thakur said.
"This is not something that is theoretical. It is absolutely there."
Researchers have been racing to better understand its capabilities ever since Moscow-based Kaspersky Lab uncovered Flame last month after the security firm was asked by a United Nations agency to look for a virus that Iran said had sabotaged its computers, deleting valuable data.
Kaspersky researchers have linked some of the software code in Flame to Stuxnet. Both were believed to be jointly developed by the US and Israel.
Symantec declined to comment on who it believes is behind Flame.
Infrastructure at risk
If Symantec's conclusions are validated, that means Flame could be used as a weapon to attack computers that run critical infrastructure systems, including dams, chemical plants and manufacturing facilities, security specialists said.
Boldizsár Bencsath, an expert on cyber warfare with Hungary's Laboratory of Cryptography and System Security, said there was at least a 70 percent chance that Flame was used to attack Iran in April.
"Of course it can be used for sabotage," said Bencsath, who began investigating Flame several weeks before it was first reported to the public.
"It may have been used to attack critical infrastructure and it may be used in the future."
Sean McGurk, a former Department of Homeland Security official who helped direct the US effort to protect critical infrastructure from cyber attacks, said that Flame was not the first piece of malicious software designed to sabotage systems by deleting data.
What made it unique, he said, is that the data-wiping module works alongside a suite of other programs including the espionage tools that have previously been identified.
"It could render computing devices useless," said McGurk, who is now chief executive of a consulting firm known as NExt Generation Micro.
That presents a threat, he said, because computers are used in all sorts of industrial control systems, affecting everything from critical processes at manufacturing plants to the pressure inside water networks.
"Cyber elements can have catastrophic impacts," he said.
Neil Fisher, vice president for global security solutions at Unisys, said Symantec's findings – if verified – mean that Flame could be "highly dangerous".
"Many of our utilities have connected their operational management to the Internet to save costs," he said.
"Water, gas, electricity certainly constitute the critical national infrastructure," he added.
"Dysfunction of those ... systems could have uncomfortable consequences for a large number of people."
(Additional reporting by Zahra Hosseinian and William Maclean; Editing by Tim Dobbyn, Tiffany Wu and Bernard Orr)