Iran said on Saturday it has detected and removed malicious software from two of its petrochemical complexes, Reuters reported.
The announcement comes after Iran said last week it was investigating whether recent petrochemical fires were caused by cyber attacks.
A military official said the malware at the two plants was inactive and had not played a role in the fires.
"In periodical inspection of petrochemical units, a type of industrial malware was detected and the necessary defensive measures were taken," Gholamreza Jalali, head of Iran's civilian defense, was quoted as saying by the state news agency IRNA.
Iran has in the past been targeted by computer viruses. In 2010, it was attacked with the Stuxnet computer virus, which destroyed Iranian centrifuges that were enriching uranium and was allegedly jointly developed by the United States and Israel.
Two years later the country's computer systems were targeted by Flame, a virus far more dangerous than the Stuxnet worm which was described by the Kaspersky Internet security firm as the “most sophisticated cyber-weapon yet unleashed”.
Iran later admitted that its oil industry was briefly affected by Flame, but claimed that Iranian experts had detected and defeated the virus.
The Islamic Republic's National Cyberspace Council announced last week that it was investigating whether the recent petrochemical fires were triggered by a cyber attack, according to Reuters.
But when asked if the fire at Iran's Bu Ali Sina refinery complex last month and other fires this month were caused by the newly-discovered malware, Jalali said, “The discovery of this industrial virus is not related to recent fires."