Saudi foreign minister Adel Al-Jubeir said his country stood ready to "do whatever it takes to protect our people".
Saudi Arabia has expressed support for the USA pulling out of the nuclear deal, saying it did not adequately address Iran's behavior in the region.
Riyadh, which leads a regional coalition that meddling in Yemen's civil war to fight the Houthis, accuses Iran of supplying the militia with ballistic missiles.
Iran's top three rivals say its development of more powerful, longer-range ballistic missiles and its backing of majority-Shiite Muslim groups overseas are destabilizing to the Middle East. Saudi Arabia is now battling an insurgent Yemeni Zaidi Shiite Muslim group-also known as the Houthis or Ansar Allah-who occasionally targets Riyadh with missiles that Saudi Arabia claims are Iranian in origin. Such behaviour is unacceptable.
As a reminder of the threat, Saudi air defences intercepted ballistic missiles fired from Yemen over Riyadh and the southern city of Jizan Wednesday.
S/Africa calls for withdrawal of Israeli forces from Gaza Strip
This step by the Trump administration was controversial because it broke with decades of United States policy and infuriated Palestinians.
Five killed in Indonesia police station attack
The string of attacks comes as Indonesia, the world's most populous Muslim country, welcomes the first day of Ramadan. State news agency Antara said two journalists who had been at the police headquarters were also hurt in the attack.
Market Trajectory Of Global Electric Shaver (Razor) : Forecast Period 2018
The report contains a comprehensive market and vendor landscape in addition to a SWOT analysis of the key vendors. Forecast, share of the market , and size of each segment and sub-segment is obtainable in the study.
Adel al-Jubeir elaborated that we will analyze the appropriate time and method to respond to Iranian retaliation. "We are trying to avoid at all costs direct military action with Iran, but Iran's behavior such as this can not continue". This amounts to a declaration of war'.
The accord trades billions in sanctions relief in exchange for commitments from Iran to get rid of its enriched uranium stockpiles and decommission the vast majority of equipment which could be used to make more.
But the USA leader claimed the "poorly negotiated" agreement still allows Tehran to develop a nuclear weapon even if it fully complies with the terms.
"We believe the nuclear deal was flawed", Jubeir said.
An OPEC source familiar with Saudi Arabia's oil strategy said on Wednesday the kingdom is monitoring the impact of U.S. withdrawal from the Iran deal on oil supplies and is prepared to offset any potential shortage.
Middle East analyst James Dorsey, a senior fellow at Singapore's S. Rajaratnam School of International Studies, believes Iran will not compromise on its ballistic missile programme "because that is the core of their defence policy". Saudi Arabia, the UAE and Bahrain praised the decision to reimpose sanctions on Tehran.
'It's about Iran, ' said Dorsey, 'not about finding a solution'.