"The Secretary-General reiterated that the attack on the Saudi embassy in Tehran was deplorable, but added that the announcement of a break in Saudi diplomatic relations with Tehran was deeply worrying," UN spokesman Stephane Dujarric told reporters.
Dujarric said Ban said this to Saudi Foreign Minister Adel al-Jubeir in a telephone call. Ban also spoke with Iranian Foreign Minister Mohammad Javad Zarif on Sunday, he added.
"The Secretary-General urged both foreign ministers to avoid any actions that could further exacerbate the situation between the two countries and in the region as a whole," Dujarric said.
"He stressed the importance of continued constructive engagement by both countries in the interest of the region and beyond," he said.
Saudi Arabia cut ties with Iran on Sunday and fellow-Sunni Bahrain followed suit on Monday, two days after Iranian demonstrators stormed the Saudi embassy in Tehran in protest over Riyadh's execution of a senior Shi'ite cleric.
The point of Ban's calls, Dujarric said, was to help ensure that both Iran and Saudi Arabia, regional rivals with a long history of tense relations, continue their commitment to ending the conflicts in Syria and Yemen, where the two countries back opposing sides.
"(The United Nations) will be pushing forward and very much hoping that the current tensions will not impact negatively on the two peace processes," Dujarric said.
The crisis in Saudi-Iranian relations could pose a major setback in efforts to end the five-year-old Syrian civil war. Dujarric said Ban's Syrian peace mediator, Staffan de Mistura, would head to Tehran and Riyadh this week for previously planned visits.
De Mistura "will assess the implications of the recent developments between Saudi Arabia and Iran on the momentum of the (peace) process for Syria," Dujarric said, adding that the envoy hoped it "does not cause a chain of adverse consequences in the region."
The breakdown in Saudi-Iranian ties could also bode badly for Yemen.
A Saudi-led coalition that has been bombing the Iranian-allied Houthi movement in Yemen for nine months announced on Saturday the end of a ceasefire that began on December 15, in a setback to UN-brokered attempts to end that conflict.
Dujarric said Ban told Jubeir that Saudi Arabia should "renew its commitment to a ceasefire" in Yemen.