A military strike against Iran by the United States or Saudi Arabia would result in “an all-out war,” the Iranian foreign minister, Mohammad Javad Zarif, said on Thursday, repeating his government’s denial of responsibility for an attack last week that damaged Saudi oil facilities and hampered the global flow of oil.

The Houthi rebels in Yemen, who are supported by Iran in their fight against a Saudi-led coalition, claimed responsibility for the attack on Saturday, but top American officials blamed Iran, and some within the Trump administration are advocating military retaliation.

The administration is still weighing how to react, but President Trump has appeared reluctant to order military action. Asked on Thursday about Mr. Zarif’s comments, Secretary of State Mike Pompeo said that Mr. Trump wanted to find a peaceful path forward.

“We’d like a peaceful resolution, indeed,” he told reporters traveling with him in the United Arab Emirates before flying back to Washington after a two-day emergency trip. “We’re still striving to build out a coalition. I was here in an act of diplomacy while the foreign minister of Iran is threatening all-out war to fight to the last American.”