The foreign ministers of Middle East rivals Iran and Saudi Arabia met in Beijing on Thursday, paving the way for normalised ties under a surprise China-brokered deal.
Tehran and Riyadh announced an agreement last month to restore relations that had been severed seven years ago when protesters in Iran attacked Saudi diplomatic missions.
The shock rapprochement between Saudi Arabia, the world's biggest oil exporter, and Iran, strongly at odds with Western governments over its nuclear activities, has the potential to reshape relations across a region characterised by turbulence for decades.
Iranian Foreign Minister Hossein Amir-Abdollahian and his Saudi counterpart Prince Faisal bin Farhan "negotiated and exchanged opinions with the emphasis on the official resumption of bilateral relations and the executive steps towards the reopening of the embassies and consulates of the two countries", Iran's foreign ministry said in a statement.
Saudi state TV channel Al Ekhbariya reported that the two ministers held a meeting in Beijing to "discuss implementing the agreement", airing footage of the pair shaking hands in front of Saudi and Iranian flags and then talking and smiling.
In a readout from state broadcaster CCTV, Beijing hailed "the first official meeting between the foreign ministers of the two countries in more than seven years" and Beijing's "active mediation" in the diplomacy.
During phone conversations in March, the ministers had vowed to meet during the Muslim holy month of Ramadan, which ends later in April.
Saudi officials had said the ministerial meeting was the next step in restoring ties, and an Iranian statement last week spoke of "the constructive path of relations between the two countries."
Under last month's agreement, the two countries are to reopen their embassies and missions within two months and implement security and economic cooperation deals signed more than 20 years ago.
Saudi Arabia severed relations with Iran in January 2016, after protesters attacked its embassy in Tehran and consulate in the Iranian city of Mashhad over Riyadh's execution of the Saudi opposition Shiite cleric Nimr al-Nimr.
Talks between the foreign ministers are expected to be followed by Iranian President Ebrahim Raisi's visit to Riyadh.
Raisi accepted an invitation from Saudi Arabia's King Salman, Iran's First Vice President Mohammad Mokhber said on Monday.
Iran and Saudi Arabia support rival sides in several conflict zones across the region, including in Yemen, where the Houthi rebels are backed by Tehran and Riyadh leads a military coalition supporting the government.
The two sides also vie for influence in Syria, Lebanon and Iraq.
Riyadh's traditional ally Washington welcomed the detente agreement, but said it remains to be seen whether the Iranians will "honour their side of the deal".
China's success in bringing Iran and Saudi Arabia together has challenged the United States' long-standing role as the main outside power broker in the Middle East.
One expert told AFP that Beijing's role would likely increase confidence that any deal would stick.
"Because China is a strong backer of Iran, Saudi should have more confidence in Iran's ability to comply with the agreement, an issue that has always been in doubt," said Joel Rubin, former US Deputy Assistant Secretary of State for Legislative Affairs.
Thursday's talks "suggest that the process hasn't gone off track since the Beijing announcement last month", said Ali Vaez, Director of the International Crisis Group's Iran Project.
"But it's still early days to judge whether this is just a tactical detente or a way-station towards strategic rapprochement."
Officials from Iran and Saudi Arabia held several rounds of dialogue in Baghdad and Oman before they reached the agreement in Beijing.
"Clearing misunderstandings and looking to the future in Tehran-Riyadh relations will definitely lead to the development of regional stability and security," Iran's Supreme National Security Council head Ali Shamkhani, who negotiated the deal for his country, said after the deal was struck.
He added that the agreement can "increase cooperation between the countries of the Persian Gulf and the Islamic world to manage the existing challenges."
In 2016 several Gulf countries followed Riyadh's action in scaling back ties with Tehran, but they have led the way in restoring diplomatic relations.
Iran welcomed an Emirati ambassador last September, after a six-year absence, and on Wednesday named its ambassador to the UAE, following a nearly eight-year hiatus.
Last year Iran said Kuwait had sent its first ambassador to Tehran since 2016.
Iran has also welcomed a potential rapprochement with Bahrain, a close Saudi ally, which in the past accused Iran of backing a Shiite-led uprising in the Sunni-ruled kingdom, an accusation Tehran denies.
"This positive development can happen in other countries in the region, including Bahrain," Iran's Foreign Ministry spokesman Nasser Kanani said last month.