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.

The visit by Hossein Amirabdollahian comes as both Saudi Arabia and Iran try to ease tensions between their nations, which long have viewed each other as archrivals for influence across the wider Middle East. Challenges remain, however, particularly over Iran’s advancing nuclear program, the Saudi-led war in Yemen and security across region’s waterways.

Amirabdollahian’s trip to Riyadh comes as the two nations are reopening diplomatic missions in each others’ countries. He was accompanied by Alireza Enayati, Iran’s new ambassador to the kingdom.

US REACHES PRELIMINARY AGREEMENT FOR SAUDI ARABIA TO RECOGNIZE ISRAEL: REPORT

Amirabdollahian met with his Saudi counterpart, Prince Faisal bin Farhan, and later delivered on-camera statements.

“Our meeting today is a continuation of the steps taken towards implementing the agreement to resume diplomatic relations, which represents a pivotal platform in the history of the two countries and the path of regional security,” Prince Faisal said.

Amirabdollahian acknowledged that Iranian President Ebrahim Raisi hopes to travel to Saudi Arabia on an official visit.

“We believe that the idea of achieving security and development in the region is an idea that cannot be fragmented,” he said.

Iranian Foreign Minister Hossein Amirabdollahian and Saudi Arabian counterpart Prince Faisal bin Farhan Al Saud

Iranian Foreign Minister Hossein Amirabdollahian, left, speaks during a joint news briefing with his Saudi Arabian counterpart Prince Faisal bin Farhan Al Saud in Riyadh, Saudi Arabia, on Aug. 17, 2023. (Iranian Foreign Ministry via AP)

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 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.

That came as Crown Prince Mohammed bin Salman, then a deputy, began his rise to power. The son of King Salman, Prince Mohammed previously compared Iran’s Supreme Leader Ayatollah Ali Khamenei to Nazi Germany’s Adolf Hitler, and threatened to strike Iran.

BIDEN DROVE ‘HISTORICALLY’ CLOSE MIDDLE EAST ALLIES INTO THE ARMS OF AMERICA’S GREATEST ENEMIES, EXPERTS SAY

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

Religion also plays a key role in tensions as well. Saudi Arabia, home to the cube-shaped Kaaba that Muslims pray toward five times a day, has portrayed itself as the world’s leading Sunni nation. Iran’s theocracy, meanwhile, views itself as the protector of Islam’s Shiite minority.

But after the coronavirus pandemic and the U.S.’ chaotic withdrawal from Afghanistan, Gulf Arab nations including Saudi Arabia have begun reassessing how to manage relations with Iran. In March, the kingdom and Iran reached an agreement with Chinese mediation to reopen embassies.

CLICK HERE TO GET THE FOX NEWS APP

The war in Yemen continues, though Saudi-led strikes have dropped dramatically amid its efforts to withdraw from the conflict, which has seen the Iranian-backed Houthi rebels maintain their yearslong hold on the capital, Sanaa.

Meanwhile, the U.S. is mediating a potential diplomatic recognition by Saudi Arabia of Israel, though Riyadh apparently seeks defense guarantees and access to American nuclear technology. While not directly acknowledging that mediation, Amirabdollahian said Iran supported the Palestinians while criticizing Israel.

“We do not have any doubt that the Zionist entity is seeking to spread division, hostility and occupying our region,” he said.