Saudi Arabia will seek to develop its own nuclear weapons if Iran does, Foreign Minister Adel al-Jubeir told CNN on Wednesday, amid spiraling tension between the regional rivals.

Asked whether Riyadh would 'build a bomb itself' if Tehran seizes on Washington's withdrawal from the 2015 Iran deal to resume a nuclear weapons program, Jubeir said: 'If Iran acquires nuclear capability we will do everything we can to do the same.'

Oil-rich Saudi Arabia has long said it would match any Iranian weapons development, but Jubeir's renewed vow came after US President Donald Trump pulled the United States out of an accord designed to prevent Tehran's alleged quest for the bomb.

Scroll down for video

Saudi Foreign Minister Adel al-Jubeir, seen here at an Arab League meeting in Cairo in November 2017, said Iran would 'do everything' to match any Iranian bid to acquire a nuclear weapon

And it came amid growing tension between the Sunni kingdom and the Shiite Islamic republic over Iran's support for the Huthi rebels in Yemen, who have been firing rockets across the border.

Riyadh, which leads a regional coalition that intervened in Yemen's civil war to fight the Huthis, accuses Iran of supplying the militia with ballistic missiles.

'These missiles are Iranian manufactured and delivered to the Huthis,' Jubeir told CNN.

Such behavior is unacceptable. It violates UN Resolutions with regards to ballistic missiles. And the Iranians must be held accountable for this.

'We will find the right way and at the right time to respond to this,' he warned.

'We are trying to avoid at all costs direct military action with Iran, but Iran's behavior such as this cannot continue. This amounts to a declaration of war.'

Donald Trump said he was ready to work on a new nuclear accord, one that would also curb Iran's missile programme

A other looming debacle is whether the US pullout from the Iran deal could trigger a nuclear arms race.

Trump said his decision to leave the JCPOA was designed to counter that possibility.

'If I allowed this deal to stand, there would soon be a nuclear arms race in the Middle East,' he said.

But minutes after he spoke, Iranian President Hassan Rouhani said Tehran could resume uranium enrichment 'without limit' if its interests are not assured by the remaining signatories.

'Whether or not (the Iranians) go for a military programme, you're going to get a nuclear race in the Middle East,' said Dorsey.

In March, Saudi Arabia's crown prince said if Iran gets a nuclear weapon, the kingdom would be compelled to follow suit.

Trump said Tuesday that he was ready to work on a new nuclear accord, one that would also curb Iran's missile programme.

Iranian demonstrators burn a picture of the U.S. President Donald Trump during a protest in response to his decision to pull out of the nuclear deal

Saudi Arabia's air defences intercepted two ballistic missiles over Riyadh on Wednesday, state media said, the latest in a series of attacks claimed by Iran-allied rebels in neighbouring Yemen.

Riyadh has long accused its regional archfoe Tehran of supplying Yemen's rebels with ballistic missiles, a charge Tehran denies.

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'.

For Saudi Arabia, that is 'fine' because it means the return of sanctions and ratcheting up pressure on Iran in the region, including by Israel.

'It's about Iran,' said Dorsey, 'not about finding a solution.'