Saudi Arabia and Iran have agreed to resume diplomatic ties and reopen embassies, they said in a joint statement carried by the Saudi state news agency SPA.
The agreement was reached after talks in Beijing between top security officials from the two countries.
Tehran and Riyadh agreed "to resume diplomatic relations between them and re-open their embassies and missions within a period not exceeding two months", according to a statement issued by Iran, Saudi Arabia and China.
"The agreement includes their affirmation of the respect for the sovereignty of states and the non-interference in internal affairs."
They also agreed to activate a security cooperation agreement signed in 2001, as well as another earlier accord on trade, economy and investment.
Both countries thanked China, as well as Iraq and Oman for hosting earlier talks in 2021 and 2022.
The agreement was signed by Iran's top security official, Ali Shamkhani, and Saudi Arabia's national security adviser Musaed bin Mohammed Al-Aiban.
The Republican-controlled US Senate narrowly advanced President Donald Trump's, sweeping tax-cut and spending bill on Saturday, during a marathon weekend session marked by political drama, division and lengthy delays as Democrats sought to slow the legislation's path to passage.
An explosive-laden car rammed into a Pakistani military convoy on Saturday in a town near the Afghan border, killing at least 13 soldiers, sources said.
Radiation levels in the Gulf region remain normal after the 12-day Israel-Iran conflict severely damaged several nuclear facilities in Iran, Director General Rafael Mariano Grossi of the International Atomic Energy Agency (IAEA) said.
Rwanda and Democratic Republic of Congo signed a US-brokered peace agreement on Friday, raising hopes for an end to fighting that has killed thousands and displaced hundreds of thousands more this year.
The US Supreme Court on the last day of rulings for its current term gave Donald Trump his latest in a series of victories at the nation's top judicial body, one that may make it easier for him to implement contentious elements of his sweeping agenda as he tests the limits of presidential power.