United Nations chief Ban Ki-moon and the Security Council on Wednesday expressed outrage at an Islamist attack on an UN compound in Somalia which killed least nine people.
Seven attackers were also killed in the suicide bombing on the UN compound in Mogadishu, and attack claimed by Shebab militants, which was followed by a fierce gun battle with security forces.
Ban telephoned Somalia's President Hassan Sheikh Mohamud soon after the attack, UN spokesman Martin Nesirky said.
"The secretary general said the United Nations would not be deterred from delivering its mandate," said Nesirky, in a statement released from Beijing where Ban is on an official visit.
He said Ban was "deeply concerned and outraged by the despicable attack."
The 15-nation Security Council also said it was outraged by the attack and praised the "brave response" by Somali armed forces and the African Union-UN peacekeepers who fought off the Shebab guerrillas.
The council "underlines that terrorist acts in Somalia will not lessen the council's resolve to support Somalia's transition to peace and stability."
It said it was ready "to take action against those whose behavior threatens the peace, stability or security of Somalia."
The UN mission to Somalia headquarters has only recently been moved to Mogadishu because of the security threat and Nicholas Kay, a British diplomat, only started as the UN envoy there on June 3.
"I don't think there has been excessive optimism," said Britain's UN ambassador Mark Lyall Grant, Security Council president for June.
"Given the 20 years of civil war and instability in Somalia, very significant progress has been made," he added.
"Everyone knows that that progress is very fragile, everyone knows there are very significant challenges, both security and political and indeed economic and humanitarian ahead for Somalia."
All Security Council members had backed moving the mission to Mogadishu.