When a swarm of drones and cruise missiles attacked Saudi Arabia's biggest oil facility on 14 September, an outraged Trump administration quickly blamed Iran for what it called an “unprecedented attack” on global energy supplies. But the real surprise was the strike's accuracy: Of 19 weapons used, all but two scored direct hits.

When the smoke cleared, Saudi officials counted 14 holes where incoming projectiles had sliced through petroleum storage tanks. Three other critical parts of the oil-processing facility had been hit and disabled, shutting down the facility and temporarily cutting Saudi oil production in half.

In subsequent reports, US analysts would describe the attack as a kind of wake-up call: evidence of a vastly improved arsenal of high-precision missiles that Iran has quietly developed and shared with allies over the past decade.

In the event of a wider war with the United States, Iran can be expected to deploy such weapons to inflict substantial damage on any number of targets, such as US military bases, oil facilities or Israel, analysts say.

On Tuesday, Iran fired more than a dozen ballistic missiles at two bases in Iraq used by the United States, according to the Pentagon, which was conducting a damage assessment.

Attack on major oil facilities in Saudi Arabia: In pictures Show all 10 1 /10 Attack on major oil facilities in Saudi Arabia: In pictures Attack on major oil facilities in Saudi Arabia: In pictures Smoke billows from multiple fires at the Aramco oil processing facility in Abqaiq, Saudi Arabia on 14 September Reuters Attack on major oil facilities in Saudi Arabia: In pictures Thick black smoke billows from a fire following drone strikes on major oil facilities in Abqaiq, Saudi Arabia Planet Labs Inc/Reuters Attack on major oil facilities in Saudi Arabia: In pictures The Aramco oil processing facility in Abqaiq, Saudi Arabia prior to the drone strikes on 14 September AP Attack on major oil facilities in Saudi Arabia: In pictures Damage is seen to the Aramco oil processing facility in Abqaiq, Saudi Arabia following drone strikes on 14 September, the previous day (Image 1 of 2) AP Attack on major oil facilities in Saudi Arabia: In pictures Damage is seen to the Aramco oil field in Abqaiq, Saudi Arabia following drone strikes on 14 September, the previous day (Image 2 of 2) AP Attack on major oil facilities in Saudi Arabia: In pictures Damage is seen to the Aramco oil field in Khurais, Saudi Arabia following drone strikes on 14 September, the previous day (Image 1 of 2) AP Attack on major oil facilities in Saudi Arabia: In pictures Damage is seen to the Aramco oil field in Khurais, Saudi Arabia following drone strikes on 14 September, the previous day (Image 2 of 2) AP Attack on major oil facilities in Saudi Arabia: In pictures Smoke billows from multiple fires following drone strikes on major oil facilities in Abqaiq, Saudi Arabia AFP/Getty Attack on major oil facilities in Saudi Arabia: In pictures Smoke rises from a fire following a drone strike at the Aramco facility in Abqaiq, Saudi Arabia on 14 September Reuters Attack on major oil facilities in Saudi Arabia: In pictures Smoke is seen following a fire at the Aramco oil processing facility in Abqaiq, Saudi Arabia on 14 September Reuters

“They're saying, 'We can now hit those,'” said Fabian Hinz, an expert on Iran's missile program at the Middlebury Institute of International Studies in Monterey, California. “What we've seen in Iran in the past few years is a change from missiles that were mainly political or psychological tools to actual battlefield weapons. This is a quantum change.”

US and Middle Eastern officials say the upgraded missiles – some with ranges of more than 1,200 miles – are but one of several potential avenues for carrying out Iran's promise to exact revenge for last week's killing of general Qassem Soleimani, Iran's most powerful military leader. Most experts believe the US would respond forcefully to any direct military attack on US assets, but Iran would possess the ability to launch a painful counterstrike or an attack on Israel.

Because Iran has provided its advanced missiles and bomb making technology to proxy groups, it also possesses options for harming its adversaries while limiting the risk of reprisals. In the past, Tehran frequently tasked pro-Iranian militant groups – chiefly the Lebanon-based Hezbollah, but also proxies and sympathisers based in Syria, Iraq, Yemen and Bahrain – with carrying out a wide range of covert actions on its behalf, including bombings and missile strikes, kidnappings and cyberwarfare.

“Iran attacks where it sees vulnerabilities, and it exercises restraint when it thinks there could be major consequences,” said Karim Sadjadpour, an Iran policy analyst at the Carnegie Endowment for International Peace, a Washington think tank.

Mr Sadjadpour said any missile launch in the near future would be less likely to come from Iran, and more apt to be fired by Iran's Houthi allies in Yemen against “soft targets” such as oil infrastructure, airports or desalination plants in gulf states. Such attacks could significantly damage the economies of key US allies while triggering a spike in global oil prices.

Smoke billows from an Aramco oil facility in Abqaiq, Saudi Arabia (AFP)

Less impactful globally, but psychologically disruptive, would be a series of assassinations or kidnappings, conducted in such a way as to shield Iran from blame. After Israeli operatives allegedly killed several Iranian nuclear scientists a decade ago, Tehran activated sleeper cells and dispatched hit men to carry out assassinations of diplomats around the world. “India, Thailand and Georgia – places you wouldn't expect,” Mr Sadjadpour said of the attempts. “US embassies throughout the world should be on alert, not just for the next few days but for at least another year.”

Iran's improved missile capability is the result of changes ordered more than a decade ago by the country's supreme leader, Ayatollah Ali Khamenei. At the time, Tehran's most sophisticated missiles were derivatives of the Soviet-era Scuds that Iran and Iraq fired at each other's cities in the 1980s during the Iran-Iraq war. Since then, the country's military laboratories have funnelled millions of dollars into creating guidance systems that would vastly improve the accuracy of new missiles and, through retrofitting, upgrade many older models.

Iran has been providing missiles to smaller groups who are likely to carry out attacks on enemies without reprisal (AFP)

The result is a line of short and medium-range missiles than can deliver warheads with an accuracy range in the tens of meters, a Defence Department intelligence official said. The official spoke on the condition of anonymity to discuss sensitive assessments of Iran's military capability.

“We have observed consistent improvements in Iranian ballistic missile accuracy,” the official said. Among the more striking and potentially worrisome developments is technology on Iran's 500-mile Qiam missile that allows controllers to fine-tune its trajectory during flight. Even the Fateh-110, a short-range model provided to Hezbollah and other militant groups, has been refitted with electro-optical and radio-guidance systems so that it can zero in on highly specific targets, the official said.

The 14 September strike on two Saudi Aramco oil facilities used armed drones and cruise missiles that are both highly manoeuvrable and difficult to stop with antimissile batteries. Yemen's Houthi rebels claimed responsibility for that attack, although US analysts later concluded that the missiles and drones were launched from southern Iran. A UN investigation was unable to find hard evidence linking the missiles and drones to Iran.

Iranian citizens cheer missile launches on US troops based in the country (Reuters)

Saudi Arabia's expensive, US-built missile defence system failed to stop the drone and missile attack, leaving local security forces with no means of defending the facilities other than with small arms.

General Joseph Votel, the former US Centcom commander who retired from the army in March, said the gains in Iran's missile capability have been surprisingly rapid.

“We've been watching this for a while, with both these drones and with missiles and other things that can actually penetrate defensive systems and get in and hit those sensitive targets,” Mr Votel said an interview with the CTC Sentinel, a publication of the Combating Terrorism Centre at West Point.

Support free-thinking journalism and attend Independent events

Most disturbing, Mr Votel said, is the “maturation of these systems and how quickly [the Iranians] are learning”.

“When you look at our long learning curve here, theirs is much sharper,” he said. “They're taking advantage of what we have learned.”

Other experts were more struck by Iran's ability to shield itself from direct blame after a major attack such as the one on the Saudi oil facilities. While Mr Trump has threatened massive retaliation for any Iranian attack on US facilities or assets, the threat becomes less meaningful if the source of the strike is ambiguous, analysts say. Such ambiguity, long an Iranian speciality, will probably be a feature of Tehran's eventual response to Soleimani's death, they said.

“I'm assuming that the Iranians will be carefully calculating some kind of revenge, which will create real pain without provoking certain retaliation,” said Greg Thielmann, a former director of strategic, proliferation and military affairs in the State Department's Bureau of Intelligence and Research. “There would seem to be an abundance of soft targets in the Middle East.”