Ban Ki-moon
United Nations Secretary-General Ban Ki-moon addresses Somali leaders in Mogadishu. Reuters

Ban Ki-moon's surprise visit to Mogadishu on Friday marked the first time since 1993 that a United Nations secretary-general had visited Somalia's capital city.

There have been good reasons for this.

Despite being the headquarters of Somalia's government, the city has been effectively lawless for years. Even after African Union (AU) troops successfully kicked out the Islamic rebel group al-Shabab, Mogadishu is still rife with paramilitary violence -- the week of Ban's arrival has been one of the most tumultuous in months, with car bombs and gun battles a regular occurrence.

On Thursday, 13 people died in a skirmish between AU troops and al-Shabab in the northern part of the city, according to reports.

Nonetheless, Ban, with a large security detail, went to Somalia to personify the U.N.'s support for the worst drought and famine to hit the region in 60 years. Thanks almost exclusively to international humanitarian aid, much of it from various U.N. agencies, three Somali states are no longer considered to be suffering from the famine. However, three states still are Iin threat of famile, with millions of people in the country at risk of starvation.

We are honored today to visit Somalia and we are here to show the people of Somalia our solidarity and how the U.N. could help the people of Somalia to a better future, Ban told a news conference in the city.

Ban and the U.N. also want to make sure that Somalia's current government -- the Transitional Federal Government -- is ready to give up power to a hopefully more effective ruling democratic body next year. Additionally, the U.N. is planning to move its Somalia mission office from Nairobi, Kenya to Mogadishu by early 2012.

“I believe we are now at a critical juncture, a moment of fresh opportunities for the future of [Somalia's] people ... to bring a new measure of stability and possibilities to people’s lives,” the U.N. chief added at the press conference.

Somalia has teetered on anarchy since the fall of the Siad Barre dictatorship in 1991. Al-Shabab is the chief social and political entity in the a number of states in the south west of the country, while the coastal north, the recent breeding ground for pirates, is primary tribal. There are a number of other clans, militias and warlords that rule various parts of the far-from-unified country.

For his safety, Ban, along with Special Representative Augustine Mahiga and Deputy Special Representative Christian Manahl, gave no prior notice of the trip to Mogadishu and did not stay over night. The last U.N. head to visit Mogadishu was Boutros Boutros-Ghali 18 years ago.