By Tuqa Khalid and Aziz El Yaakoubi

DUBAI (Reuters) – The United States said on Thursday it was building a coalition to deter Iranian threats following a weekend attack on Saudi Arabian oil facilities.

Iran has warned U.S. President Donald Trump against being dragged into a war in the Middle East and said it would meet any offensive action with a crushing response.

U.S. Secretary of State Mike Pompeo said that Trump, who has ordered more sanctions on Iran, wants a peaceful solution to the crisis.

He was speaking after talks with Saudi and Emirati leaders over the strike that Washington and Riyadh have blamed on Tehran.

Iran denies involvement in the Sept. 14 attack that initially halved Saudi oil output and which Pompeo earlier called an act of war against the world's largest oil exporter.

Pompeo appeared to soften his tone on Thursday after talks with Abu Dhabi's crown prince, the de facto ruler of the United Arab Emirates, which is Riyadh's main Arab ally.

"We are here to build out a coalition aimed at achieving peace and a peaceful resolution. That's my mission, that's what President Trump certainly wants me to work to achieve and I hope that the Islamic Republic of Iran sees it that way," Pompeo told reporters.

He did not provide details about the coalition. The United States has however been trying to create a global maritime security alliance since attacks on oil tankers in Gulf waters, which Washington also blamed on Iran.

Pompeo described his proposed coalition as "an act of diplomacy while the foreign minister of Iran is threatening all out war".

Iran's foreign minister, Mohammed Javad Zarif, told CNN that the Islamic Republic "won't blink" if it has to defend itself against any U.S. or Saudi military strike, which he said would lead to "all-out war".

‘B TEAM'

Zarif mocked Pompeo, saying he was part of a so-called "B-team", along with Saudi Arabia's crown prince, which is trying to dupe Trump into opting for war.

Pompeo on Wednesday met Saudi Crown Prince Mohammed bin Salman, who has called the assault on oil plants a "test of global will".

Riyadh has displayed what it described as remnants of 25 Iranian drones and missiles used in the strike, saying it was undeniable evidence of Iranian aggression.

Pompeo earlier welcomed an announcement by the UAE that it was joining the maritime coalition, a day after Riyadh said it would too.

Britain and Bahrain previously said they are participating but most European countries have been reluctant to sign up for fear of stoking regional tensions. Iraq said it would not join the mission, and also rejected any Israeli role in it.

Russian Foreign Minister Sergei Lavrov urged all countries in the Gulf to sit down for talks to defuse tensions and said groundless accusations against Iran over the attacks were inflaming tensions, Interfax news agency reported.

Yemen's Iran-aligned Houthi movement, which is battling a Saudi-led military coalition, claimed responsibility for the assault on two Saudi oil plants, including the world's largest processing facility. U.S. and Saudi officials rejected the claim, saying the attack had not come from the south.

Kuwait, which said earlier this week it was investigating the detection of a drone over its territory, has put its oil sector on high alert and raised security to the highest level as a precautionary measure.

Oil prices, which soared following the attack, steadied after Saudi Arabia pledged to restore full oil production by the end of September.

U.N. MEETING IN FOCUS

Proof of Iranian responsibility, and evidence that the attack was launched from Iranian territory, could pressure Riyadh and Washington, which want to curb Iranian influence in the region, into a response.

Pompeo said the attacks would be a major focus of next week's annual U.N. General Assembly meeting and suggested Riyadh could make its case there.

Iran's Zarif accused Pompeo of trying to "dodge a U.S. obligation" to issue visas for Iran's U.N. delegates.

Tehran says the U.S. accusations are part of Washington's "maximum pressure" policy on Iran to force it to renegotiate a 2015 nuclear deal with world powers, which Trump exited last year, reimposing sanctions to choke off Iran's oil exports.

Tehran, which has gradually scaled back its nuclear commitments, has rejected any talks unless sanctions are lifted.

"The United States is now using oil as a weapon; oil is not a weapon," Iranian Oil Minister Bijan Zangeneh said.

(Reporting by Tuqa Khalid and Aziz El Yaakoubi; Additional reporting by Mahal El Dahan, Nafisa Eltahir, Maher Chmaytelli, Rania El Gamal, Stephen Kalin and Dubai newsroom, Sudip Kar-Gupta in Paris, Michelle Martin in Berlin, Julia Payne and Dmitry Zhdannikov in London, Maria Tsvetkova in Moscow, John Davison and Mohammed Katfan in Baghdad, Ahmed Tolba and Samar Hassan in Cairo; Writing by Ghaida Ghantous; Editing by Giles Elgood)