Iran’s foreign minister warned Thursday of an “all-out war” if the US or Saudi Arabia launches military strikes in retaliation for the drone and missile attacks on Saudi oil sites.

Mohammad Javad Zarif told CNN that Tehran hoped to avoid conflict, adding that the country was willing to hold discussions with its regional rivals Saudi Arabia and the United Arab Emirates.

But the top Iranian diplomat rejected negotiations with Washington unless the US provided full sanctions relief as promised under the 2015 nuclear deal, which President Trump pulled the US out of last year.

Zarif again denied Iran’s involvement in last weekend’s attacks on the Saudi oil facilities.

He added that Yemen’s Iran-backed Houthi rebels — who have claimed responsibility for the attacks — have the know-how to carry out a sophisticated operation like the one that knocked out half of the kingdom’s energy production.

But Zarif was unable to provide proof that Houthis launched the drones and missiles.

“I cannot have any confidence that they did it because we just heard their statement,” Zarif told CNN. “I know that we didn’t do it. I know that the Houthis made a statement that they did it.”

Zarif’s comments appeared to be in response to Secretary of State Mike Pompeo, who a day earlier, while traveling to Saudi Arabia, referred to the attacks as an “act of war.”

Asked by CNN what would be the consequence of an American or Saudi strike, Zarif said: “All-out war.”

“I make a very serious statement about defending our country. I am making a very serious statement that we don’t want to engage in a military confrontation,” he said, adding that a military response based on “deception” about the weekend attacks would cause “a lot of casualties.”

He added: “But we won’t blink to defend our territory.”

Pompeo met with Saudi Crown Prince Mohammad bin Salman in Jiddah over Saturday’s attacks on a crucial oil processing facility and oil field.

Calling the attacks “unprecedented,” the top US diplomat tweeted early Thursday: “The U.S. stands with #SaudiArabia and supports its right to defend itself. The Iranian regime’s threatening behavior will not be tolerated.”

Trump has been noncommittal on whether he would order US military retaliation.

On Wednesday, the president said he was moving to increase financial sanctions on Tehran over the attack, without elaborating.

Iran is already subject to a crushing US sanctions program targeting its crucial oil industry.

Pompeo left Jiddah on Thursday for the United Arab Emirates to meet with Abu Dhabi’s powerful crown prince, Sheikh Mohammed bin Zayed Al Nahyan.

The UAE, a close ally of Saudi Arabia, has joined the kingdom in its war in Yemen against the Houthis.

On Thursday, the UAE announced it had joined a US-led coalition to protect waterways across the Mideast after the attack on the Saudi oil installations.

The US formed the coalition after attacks on oil tankers that American officials blame on Iran, as well as Iran’s seizure of tankers in the region.

Iran denies being responsible for the tanker explosions, though the attacks came after Tehran threatened to stop oil exports from the Persian Gulf.

With Post wires