The agreement was reached on Friday during talks in Beijing.
Iranian state media posted images and video of Ali Shamkhani, secretary of the Supreme National Security Council of Iran, with Saudi national security adviser Musaad bin Mohammed al-Aiban and Wang Yi, China’s most senior diplomat.
“After implementing the decision, the foreign ministers of both nations will meet to prepare for an exchange of ambassadors,” Iranian state television said.
In the footage aired by Iranian media, Wang offered “whole-hearted congratulations” on the two countries’ “wisdom”.
“Both sides have displayed sincerity,” he said. “China fully supports this agreement.”
The Saudi Press Agency confirmed the agreement when it also published the joint statement from Saudi Arabia and Iran, which said the two countries had agreed to respect state sovereignty and not interfere in each other’s internal affairs.
The statement also said Riyadh and Tehran had agreed to activate a security cooperation agreement signed in 2001.
Riyadh, Tehran and Beijing “expressed their keenness to exert all efforts towards enhancing regional and international peace and security,” the statement said.
Iran’s state-run IRNA news agency quoted Shamkhani as calling the talks in Beijing “clear, transparent, comprehensive and constructive”.
“Removing misunderstandings and the future-oriented views in relations between Tehran and Riyadh will definitely lead to improving regional stability and security as well as increasing cooperation among Persian Gulf nations and the world of Islam for managing current challenges,” Shamkhani was quoted as saying.
Wang said China will continue to play a constructive role in handling hotspot issues and demonstrate responsibility as a major nation.
As a “good-faith” and “reliable” mediator, China has faithfully fulfilled its duties as a host for dialogue, he said.
Tensions have long been high between the regional rivals.
Riyadh broke off ties with Tehran in 2016 after protesters invaded Saudi diplomatic posts in Iran. Saudi Arabia had executed a prominent Shia Muslim scholar days earlier, triggering the demonstrations.
Shia-majority Iran and Sunni-majority Saudi Arabia support rival sides in several conflict zones across the Middle East, including in Yemen, where the Houthi rebels are backed by Tehran and Riyadh leads a military coalition supporting the government.
But both sides have recently sought to improve ties.
“In the last couple of years, there had been meetings between Saudi and Iranian officials in Baghdad,” Al Jazeera’s Ali Hashem said while reporting from Tehran. “The Iraqis started mediation talks back in 2021. Everything stopped during the Iraqi elections of 2021.”
“There was no news coming out after five rounds of talks,” he said. “Security-level meetings took place in Oman too. Those were mainly concentrated on the situation in Yemen.”
Besides the war in Yemen, Iran and Saudi Arabia also are on rival sides in Lebanon and Syria. Improved relations between Tehran and Riyadh, therefore, could have an effect on politics across the Middle East.
“The security situation in the region, like in Yemen and Lebanon, deteriorates and suffers when these two countries have differences,” Hashem said.
“With this deal, it is possible that we might start to see compromises in these countries,” he said. “This deal can lead to the creation of a better security situation in the region. They have a lot of leverage in these countries.”
Adnan Tabatabai – CEO of the Center for Applied Research in Partnership with the Orient, a Germany-based think tank – told Al Jazeera that China has a big interest in not seeing the regional security situation “descend into chaos”, such as “in 2019, when the waterways of Hormuz were the sites of different explosions and attacks”.
“There are inherent interests for the Chinese to try and use the leverage that they have towards both Tehran and Riyadh to make some efforts to balance these relations and finalise what the Iraqis and Omanis had in fact started,” Tabatabai said.
Iranian President Ebrahim Raisi visited Beijing last month, and Chinese President Xi Jinping was in Riyadh in December to attend meetings with oil-rich Gulf Arab nations crucial to China’s energy supplies. China is a top purchaser of Saudi oil.
A White House National Security Council spokesperson said the United States is aware of reports that Iran and Saudi Arabia have resumed diplomatic relations but referred further details to the Saudis.
“Generally speaking, we welcome any efforts to help end the war in Yemen and de-escalate tensions in the Middle East region,” the spokesperson told the Reuters news agency. “De-escalation and diplomacy together with deterrence are key pillars of the policy President [Joe] Biden outlined during his visit to the region last year.”
Referring to the US playing no role in this agreement, Tabatabai said it has been common to hear anti-American sentiments in Iran but “from at least the fall of 2019 onwards, there is also some disappointment and some increasing scepticism inside Saudi Arabia towards the role of the US in that region.
“The security umbrella is no longer an actual idea that the US was supposed to build for Saudi Arabia and its allies, so there was a need also sensed in Saudi Arabia to think in a different way about how it can secure its territory, borders and interests.”