The United Nations moved quickly today to shelter peace efforts in Syria and Yemen from the diplomatic storm unleashed by the dispute between Saudi Arabia and Iran.

UN Syria envoy Staffan de Mistura travelled to Riyadh for urgent talks and was to head later this week to Tehran to seek assurances that hard-fought gains in the Syria peace process had not been derailed.

De Mistura is counting on broad support to launch peace talks between President Bashar al-Assad's government and the opposition in Geneva on January 25 -- the culmination of a three-month effort involving all key players.

UN Secretary-General Ban Ki-moon spoke by phone with the Saudi and Iranian foreign ministers to urge them to "avoid any actions that could further exacerbate the situation between two countries and in the region as a whole," said Ban's spokesman Stephane Dujarric.

"A breakdown of relations between Riyadh and Tehran could have very serious consequences for the region," said Dujarric.

Both Iran and Saudi Arabia have a crucial role in the diplomatic push to end the nearly five-year war in Syria and to bring about a political settlement for Yemen.

Relations between the two rivals have been testy, but the furor over the Saudi execution of Shiite cleric Nimr al-Nimr, who had criticised the Sunni royal family, threatened to spill over.

After protesters set fire to the Saudi embassy in Tehran, Saudi Arabia cut ties with Iran, giving diplomats 48 hours to leave the country.

In his conversation with Saudi Foreign Minister Adel al-Jubeir, Ban expressed his "disappointment" over the execution of al-Nimr, whose case he had raised with Riyadh many times, said Dujarric.

While the UN chief said the Iranian attack on the Saudi embassy was "deplorable," the Saudi decision to break off relations with Tehran was "deeply worrying," he told Jubeir.

Ban spoke to Iranian Foreign Minister Mohammad Javad Zarif yesterday and urged him to protect diplomatic facilities after the attack on the Saudi embassy.

In a conciliatory sign, Iran's Ambassador to the United Nations, Gholamali Khoshroo, pledged in a letter to Ban today that "Iran will take necessary measures to prevent the occurrence of similar incidents in the future."

The Saudi-Iran rift was seen by UN diplomats as a potential setback to the peace effort in Syria, where Tehran is among Assad's strongest allies while Riyadh is backing militias fighting Damascus.