Hassan Rouhani says they just hit an industrial centre... to warn. (File)

Iran's President Hassan Rouhani said Wednesday Yemenis targeted Saudi oil facilities as a "warning" about a possible wider war in response to the kingdom's US-backed intervention in their conflict-ravaged country.

"The Yemenis... haven't hit a hospital, they haven't hit a school, they haven't hit Sanaa bazaar. They just hit an industrial centre... to warn you," Rouhani said after a cabinet meeting.

"Learn lessons from this warning and consider that there could be a war in the region," he said, in a likely address to the rulers of Saudi Arabia which has spent billions of dollars on US weapons.

Yemen's Iran-aligned Huthi rebels claimed responsibility for the strikes but a US official said Tuesday that the administration of President Donald Trump concluded the attacks involved cruise missiles from Iran.

Saudi Arabia, which has been bogged down in a five-year war in Yemen, has said the weapons used in the attacks were Iranian-made but has not directly blamed its regional arch-rival.

Tehran has repeatedly denied accusations from Washington and Riyadh that it arms the Huthis.

Saturday's attacks on Saudi energy giant Aramco's Abqaiq processing plant and Khurais oil field halved the kingdom's oil output.