Iran is investigating a suspected cyber attack on the country's main oil export terminal and on the Oil Ministry itself.
A virus was detected inside the control systems of Kharg Island, the country's largest crude oil export facility, but the terminal remained operational, a source at the National Iranian Oil Company (NIOC) said.
The virus, which is likely to be compared to the Stuxnet computer worm which reportedly affected Iranian nuclear facilities in 2009-10, struck late on Sunday.
It hit the Internet and communications systems of Iran's Oil Ministry and of its national oil company, the semi-official Mehr news agency reported.
Computer systems controlling a number of Iran's other oil facilities have been disconnected from the Internet as a precaution, the agency added.
Hamdullah Mohammadnejad, the head of civil defence at the Oil Ministry, was reported as saying Iranian authorities had set up a crisis unit and were working out how to neutralise the attacks.
IT systems at the Oil Ministry and at the national oil company were also disconnected to prevent the spread of any virus, the Mehr news agency said.
The Ministry's own media network, Shana, quoted a spokesman as saying no major damage had been sustained.
Iran's nuclear programme is thought to be the principal target of the Stuxnet worm – discovered in 2010 – the first virus believed to have been specifically designed to subvert industrial systems.
US-based think-tank, the Institute for Science and International Security (ISIS), said that in late 2009 or early 2010 about 1,000 centrifuges – machines used to refine uranium – out of the 9,000 used at Iran's Natanz enrichment plant, had been knocked out by the virus; not enough to seriously harm its operations.
Iran also identified damage inflicted by a similar virus aimed at disrupting industrial processes, called Duqu.
Experts say Duqu appears to be designed to gather data to make it easier to launch future attacks and that very few organisations could have written such complex programs.
Most of the world's oil facilities are controlled by computers, but some processes can be controlled manually when necessary.
A shipping source with knowledge of operations at Kharg Island said that NIOC has been prevented from sending out the crude loading programme at the terminal.