In this picture released by the Iranian Foreign Ministry, Iran's Foreign Minister Hossein Amirabdollahian, left, meets with Saudi Arabia's Crown Prince Mohammed bin Salman in Jeddah, Saudi Arabia, Friday, Aug. 18, 2023. Iran's foreign minister traveled to Saudi Arabia on Thursday, marking the first trip to the kingdom by Tehran's top diplomat in years after the two nations reached a détente with Chinese mediation. (Iranian Foreign Ministry via AP)

DUBAI, United Arab Emirates (AP) — Iran's foreign minister met Friday with Saudi Arabia's Crown Prince Mohammed bin Salman as part of his visit to the kingdom, a sign of how the two countries are trying to ease tensions after years of turmoil.

Images of Iran's top diplomat, Hossein Amirabdollahian, sitting with Prince Mohammed would have been unthinkable only months earlier, as the longtime rivals have been engaged in what officials in both Tehran and Riyadh have viewed as a proxy conflict across the wider Middle East. The prince even went as far as to compare Iranian Supreme Leader Ayatollah Ali Khamenei to Adolf Hitler at one point in 2017.

But since reaching a Chinese-mediated détente in March, Iran and Saudi Arabia have moved toward reopening diplomatic missions in each other's countries. Saudi King Salman has even invited Iranian President Ebrahim Raisi, a hard-line protégé of Khamenei, to visit the kingdom as well.

Challenges remain, however, particularly over Iran’s advancing nuclear program, the Saudi-led war in Yemen and security across the region’s waterways. Meanwhile, the U.S. is still trying to finalize a deal with Iran to free detained American citizens in exchange for the release of billions of dollars frozen in South Korea, while also bolstering its troop presence in the Persian Gulf.

Saudi state television aired images of Prince Mohammed sitting with Amirabdollahian in the Red Sea port city of Jeddah.

The state-run Saudi Press Agency offered few substantive details of their conversation, saying merely that they reviewed relations and “future opportunities for cooperation.”

In a post on X, formerly known as Twitter, Amirabdollahian said the two men talked for 90 minutes at their meeting in Jeddah.

“Honest, open, useful and fruitful talks based on neighborly policy,” the foreign minister wrote in his post. "Through the wills of heads of the two countries, sustainable bilateral ties in all fields have persisted. We agree on ‘security and development for all’ in the region.”

Amirabdollahian arrived Thursday in Riyadh, the Saudi capital, for meetings with his counterpart, Prince Faisal bin Farhan. The kingdom broke ties with Iran in 2016 after protesters invaded Saudi diplomatic posts there. Saudi Arabia had executed a prominent Shiite cleric with 46 others days earlier, triggering the demonstrations. The kingdom also initially backed rebels trying to overthrow the Iranian-backed president of Syria, Bashar Assad, while also opposing the Iranian-backed militant group Hezbollah in Lebanon.

Since the U.S. unilaterally withdrew from Iran’s nuclear deal with world powers in 2018, Iran has been blamed for a series of attacks. Those assaults include one targeting the heart of Saudi Arabia’s oil industry in 2019, temporarily halving the kingdom’s crude production.

But after the coronavirus pandemic and the chaotic U.S. withdrawal from Afghanistan, Gulf Arab nations including Saudi Arabia have begun reassessing how to manage relations with Iran. Prince Mohammed as well wants a peaceful Middle East with stable oil prices to fuel his own grand development plans for the kingdom costing billions of dollars.

In March, the kingdom and Iran reached an agreement in China to reopen embassies.

Before Amirabdollahian’s visit, the last Iranian foreign minister to visit Saudi Arabia on a public trip was Mohammad Javad Zarif, who traveled to the kingdom in 2015 to offer condolences for the death of King Abdullah.

The visit comes as Saudi Arabia is still struggling to withdraw itself from its yearslong war in Yemen against the Iranian-backed Houthi rebels who hold the capital, Sanaa. Amirabdollahian's visit coincides with a new visit by Omani mediators there to try to reach a peace agreement.

___

Associated Press writer Nasser Karimi in Tehran, Iran, contributed to this report.