Iran's oil ministry, national oil company and a number of other companies affiliated with the ministry were hit by a cyberattack on Sunday, according to semiofficial news agency Mehr.
Mehr said an export terminal in Kharg Island and other oil facilities came under attack from malware and hackers, but continued their work as usual.
As a result, the country disconnected its oil ministry and its main crude export terminal from the Internet so as to avoid being attacked by computer malware.
Mehr quoted Hamdollah Mohammadnejad, deputy oil minister in charge of civil defense, as saying the ministry and some provincial officers were taken offline, and a special headquarters was set up to confront the attacks.
Some 80 percent of Iran's daily 2.2 million barrels of crude export goes through the Kharg facility, located off its southern coast.
Iran says that it is involved in a long-running technological war with the United States and Israel. In recent years, Tehran has repeatedly announced it has defused malware in its industrial sector including the highly specialized Stuxnet in 2010, which it said had targeted the country's nuclear facilities.
Earlier this year, head of Iran's civil defense agency Gholam Reza Jalali said the energy sector of the country has been a main target of cyberattacks over the past two years.
Iran recently announced a series of cyberdefense measures spearheaded by the Revolutionary Guards, a unit which already runs every key military program in Iran and many industries.
In March, the Guard set up what it claims is a hack-proof communications network for its high-level commanders.
Ultimately, Iran says it wants to set up a completely indigenous Internet that is also aimed at checking a "cultural invasion" by enemies aimed at promoting dissent and undermining the ruling system.
The Stuxnet virus was reported to have disrupted controls of some nuclear centrifuges. Tehran says its scientists neutralized the malware and it only damaged the laptops of some personnel at a nuclear power plant.
Iran is at odds with Israel and the West over its controversial nuclear program. The U.S.and its allies accuse Tehran of wanting to develop weapons technology. Iran denies the claims, saying its program is for peaceful purposes.
Iran has reported other cyberattacks since, including an infection in April 2011 dubbed "Stars" and a spy virus about which little is known but its name, "Doku."
Want to enjoy 'Zen' reading - with no ads and just the article? Subscribe todaySubscribe now