Archrivals Iran and Saudi Arabia agreed Friday to restore diplomatic relations, a dramatic breakthrough brokered by China after years of soaring tensions between the two Middle Eastern powerhouses.

The deal, which will see the two countries reopen embassies in each other’s capitals, was sealed during a meeting in China — a boost to Beijing’s efforts to rival the United States as a broker on the global stage.

The agreement also may put a dampener Israel’s ongoing efforts to normalize relations with its Arab neighbors.

The talks were held because of a “shared desire to resolve the disagreements between them through dialogue and diplomacy, and in light of their brotherly ties,” according to a joint communique from Tehran, Riyadh and Beijing that was published by the Saudi Press Agency, the country’s official news agency.

Iranian protesters shout slogans during a demonstration against Saudi Arabia outside its embassy in Tehran
Saudi Arabia broke off ties with Iran in 2016 after protesters stormed Saudi diplomatic posts in Iran and set fire to the Saudi Embassy in Tehran.
Atta Kenare / AFP via Getty Images file

The agreement followed intensive negotiations between Ali Shamkhani, a close adviser to Iran’s supreme leader Ayatollah Ali Khameni, and Saudi Arabia’s Minister of State Musaad bin Mohammed Al-Aiban, according to the statement.

It added that the foreign ministers from both countries would “meet to implement this, arrange for the return of their ambassadors, and discuss means of enhancing bilateral relations.”

The pact was first announced on Iranian state TV.

Tensions between Sunni Muslim powerhouse Saudi Arabia and Iran, which is majority Shiite, have dominated the region for decades.

The two countries have been locked in an intensifying struggle for dominance, their rivalry exacerbated by proxy conflicts, including the war in Yemen.

Saudi Arabia, the birthplace of Islam and the site of its two holiest cities, has historically seen itself as the leader of the Muslim world. The Iranian Revolution of 1979 shook Saudi Arabia and other Gulf kingdoms, which saw the regime in Tehran as a rival.

While tensions brewed for years, Saudi Arabia broke off ties in 2016 after protesters stormed Saudi diplomatic posts in Iran and set fire to the embassy in Tehran. 

Days earlier, Saudi Arabia had executed the prominent Shiite cleric Nimr al-Nimr.

“Clearing up the misunderstandings and looking to the future in Tehran-Riyadh relations will definitely lead to the development of regional stability and security and the increase of cooperation between the countries of the Persian Gulf and the Islamic world to manage the existing challenges,” Shamkhani said Friday after signing the deal, according to Press TV.

Saudi Arabia, one of the largest oil producers in the, has been a vital American ally in the region. But after the CIA concluded that its leader Crown Prince Mohammed bin Salman ordered the October 2018 slaying and dismembering of Washington Post columnist Jamal Khashoggi, President Joe Biden vowed to make the country an international “pariah.”

Bin Salman, whose bid to present himself as a reformer was truly shattered by the killing, has said he takes full responsibility for Khashoggi’s murder, but denies any involvement in the slaying of the journalist — an outspoken critic of the crown prince.

With global oil supplies affected by Russia’s war in Ukraine, Biden visited Saudi Arabia in July to reset ties and encourage efforts to end the war in Yemen.  

The U.S. and Iran meanwhile have been increasingly at odds over the country’s advancing nuclear program, anti-regime protests and Tehran’s drone deliveries to Russia. 

Having tried to revive the 2015 nuclear deal through diplomacy, the Biden administration has been tightening economic pressure on Iran and has sent a signal that military force remains an option if all other means fail to stop Iran from developing nuclear weapons. 

The 2015 accord, known as the Joint Comprehensive Plan for Action or JCPOA, was designed to prevent Iran from developing nuclear weapons and imposed strict limits on Tehran’s nuclear activities in return for an easing of U.S. and international economic sanctions. Then-President Donald Trump withdrew the U.S. from the deal in 2018 and reimposed an array of sanctions.