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.
Kuwait's Ministry of Defence said an Iranian attack targeted a building belonging to a Chinese company in the north of the country on Thursday, killing one worker and causing extensive material damage to the facility.
India's Central Bureau of Investigation has filed charges against 13 people in connection with leaked question papers for the national medical college entrance test, days after youth-led protests over the scandal forced the education minister to quit.
A preliminary investigation by relevant authorities has found that a drone caused the fire involving two vessels at Damietta Port on Wednesday, Egypt's Cabinet said.
Russia pounded Ukraine with dozens of missiles and hundreds of drones, killing eight people in overnight attacks on Thursday, President Volodymyr Zelenskyy said, decrying shortages of air defence supplies and urging allies to help.
France, Spain and Greece battled major wildfires on Thursday, with Spain bringing one blaze under control but facing new threats as intense heat, dry vegetation and powerful winds kept much of southern Europe on alert.