Saudi Arabia intercepted two Houthi ballistic missiles launched towards Makkah and Riyadh on Monday after the Yemeni rebels said they planned to strike at hundreds of Saudi and UAE targets.
Air defences destroyed the missiles above the western cities of Taif and Jeddah, Saudi media reported.
Yemen’s internationally recognised government condemned the rebel attack and accused Iran of ordering the strikes.
“The attempt to target Makkah will drag the region into a dangerous scenario. It also shows Iran’s full control over the rebels,” the government said in a statement.
“The attack on a Muslim holy site is a terror crime,” it said.
The rebels have launched scores of missile attacks on Saudi Arabia in recent years. Monday's launches came a day after the Houthis' Saba news agency quoted a rebel military source as saying they planned to strike 300 Saudi and UAE targets, including military headquarters and bases in both countries and their bases in Yemen.
Last week, the Saudi Arabia reported that armed drones struck two oil pumping stations, after the Houthi-run Masirah TV said the rebels had launched drone attacks on Saudi installations.
The UAE’s Minister of State for Foreign Affairs, Dr Anwar Gargash, said last week that the reservoir of confidence for the Houthis was empty and their latest moves had done little to refill it.
Yemen is, he said, another example of how Tehran’s actions do not match its words.
Iran often says its ballistic missile programme is purely defensive, but Dr Gargash said the significant evidence of Iranian contribution to the Houthi missile programme showed this not to be the case.
The rebels, he said, did not have the technology two or three years ago to hit Saudi towns and cities, but now regularly launched attacks that damaged homes and killed civilians.
Meanwhile, forces loyal to Yemen's internationally recognised government said they had captured an Al Qaeda leader in the south-western province of Taez.
The military said special forces arrested Bilal Muhammed Ali Al Wafi on Saturday in the mountain area of Habashi.
Al Wafi, in his 30s, is a key member of Al Qaeda in the Arabian Peninsula, or Aqap, and has helped to carry out several deadly attacks, including the 2012 bombing of a Yemeni military parade that killed dozens of troops.
The US designated Al Wafi as a terrorist in 2017.
Al Qaeda has maintained a presence in the country throughout the chaos of Yemen's four-year civil war between the government, backed by Saudi Arabia, and the Iran-aligned rebels.
Saudi Arabia's Minister of State for Foreign Affairs, Adel Al Jubeir, said on Sunday that the kingdom wanted to avert war in the region but was ready to respond with "all strength" to attacks.
Riyadh accused Tehran of ordering the drone strikes on its oil pumping stations, which came two days after sabotage attacks on four oil tankers off the UAE coast – two of them Saudi, one Emirati and the other Norwegian. The UAE, Saudi Arabia and Norway are investigating the sabotage, which has not been claimed by any group. Iran has distanced itself from both sets of attacks.
“Although it has not affected our supplies, such acts of terrorism are deplorable," Saudi Energy Minister Khalid Al Falih said. "They threaten uninterrupted supplies of energy to the world and put a global economy that is already facing headwinds at further risk."
The attacks come as the United States and Iran spar over Washington's tightening of sanctions aimed at cutting Iranian oil exports to zero, and an increased US military presence in the Gulf over perceived Iranian threats to US interests.