"The Secretary-General was deeply shocked to learn of today's destructive attack on the holy Shrines of Imam Ali Al-Hadi and Imam Hassan Al-Askary in Samarra," said his spokesperson Michele Montas in a statement.
Mr. Ban "strongly condemns this act, which was clearly aimed at provoking sectarian strife and undermining the peace and stability of Iraq," she said.
The statement called on all Iraqis "to avoid succumbing to the vicious cycle of revenge and to exercise maximum restraint while demonstrating unity and resolve in the face of this terrible attack." Mr. Ban also welcomed efforts by Iraqi political and religious leaders to calm the situation and to promote respect for human rights and the protection of religious sites.
He pledged that the UN "will continue to do everything possible to help the Iraqi people promote inter-communal dialogue and national reconciliation."
Mr. Ban's statement came on the heels of a statement by his Special Representative for Iraq, Ashraf Qazi, who "condemned in the strongest terms possible the sacrilegious attack on the holy Shrines of Imam Ali Al-Hadi and Imam Hassan Al-Askary in Samarra."
Calling the attack on the holy Shi'a shrines "atrocious," he said it was a "horrendous, sinister and unspeakable crime whose perpetrators once again intended to inflame sectarian passions, destroy efforts aimed at national reconciliation and undermine any prospect of peace and stability in Iraq."
Urging Iraqis to exercise maximum restraint and recalling May's "horrible attack on the Shrine of Abdul-Qader Al-Gilani Mosque in Baghdad," a revered Sunni site, Mr. Qazi reaffirmed the UN's condemnation of the targeting of all places of worship.
He called on all Iraqis to "close ranks more than ever before and demonstrate unity and resolve in the face of this menace that threatens Iraq national fabric." Doing so, he said, "will deny those behind such horrific acts the opportunity to undermine the ongoing efforts to consolidate peace and security in the country."
Mr. Qazi also called on the Iraqi authorities to ensure that those responsible are brought to justice.
According to the UN High Commissioner for Refugees (UNHCR), more than 730,000 Iraqis have been forced to flee their homes since the al-Askary shrine in Samarra was bombed last February.