Iranian President Hassan Rohani said on Wednesday that Saudi Arabia had made a "strategic mistake" by considering the United States and Israel as friends and Iran as an enemy.

>> Explained: Who Wants a War in the Middle East?

Rohani said that Saturday’s missile attacks by Yemen's Iran-backed Houthis targeting the Saudi Arabian capital of Riyadh were a reaction to what he called Saudi aggression.

"How should the Yemeni people react to bombardment of their country. So they are not allowed to use their own weapons? You stop the bombardment first and see if the Yemenis would not do the same," Rohani was quoted as saying by Tasnim news agency.

Saudi Arabia blamed Tehran and the Iranian-backed Lebanese militia Hezbollah for Saturday’s missile. Saudi Foreign Minister Adel bin Ahmed said Saudi Arabia considers the attack an act of war by Iran.

>> Is Saudi Arabia Pushing Israel Into War With Hezbollah and Iran? | Opinion

"It was an Iranian missile, launched by Hezbollah, from territory occupied by the Houthis in Yemen," al-Jubeir told CNN.

"We see this as an act of war," al-Jubeir said. "Iran can not lob missiles at Saudi cities and towns and expect us not to take steps." Al-Jubeir then cited article 51 of the UN Charter, which says a nation can act if an armed attack is made against it.

The Houthis claimed the attack, and said in a statement that the missile was launched in response to bombings that have killed civilians. The Houthis have fired a number of missiles across the border in recent years, but this appeared to be the deepest strike yet within Saudi territory.

Rohani on Wednesday also addressed the resignation of Lebanese Prime Minister Saad Hariri. "Why are you interfering with Lebanon's internal affairs and governance," Rohani said, addressing Saudi Arabia. "This is an unprecedented event in history."

>> Prime Minister Hariri's Resignation Threatens Iranian Grip on Lebanon | Analysis

Hariri unexpectedly announced he was resigning on Saturday and accused Iran of meddling in Arab affairs and the Iran-backed Lebanese militant group Hezbollah of holding Lebanon hostage.

The surprise resignation, announced on TV from Saudi Arabia, threw the Lebanese government into disarray and exposed a new front for the tensions between the Sunni powerhouse and its archrival Shi’ite-led Iran.

Iranian officials have called the resignation a "plot" by the United States, Israel and the Saudis to foment tensions in Lebanon and the region