NAIROBI, Kenya —The UN office for Somalia relocated to Mogadishu today, marking the first time in 17 years that a headquarters has opened in the capital.

Augustine Mahiga, the UN's top diplomat for Somalia handed his credentials to President Sharif Sheikh Ahmed at the presidential palace saying, "I am here to bring the office of the UN for Somalia to Somalia." 

Until today Somalia was the only county of the 194 countries recognized by the UN that did not have a representative of the Secretary-General in the country, underscoring the country's long-standing insecurity and danger. Mahiga said he hoped the decision to move the UN Political Office for Somalia to Mogadishu would encourage other UN agencies to follow suit as well as international diplomatic missions.

More from GlobalPost: Ban Ki-moon makes surprise visit to Mogadishu

Somalia is due to write a new constitution, elect a new parliament and form a new government by August as part of a political deal agreed in September. Mahiga's role is to be midwife to the new dispensation, something he says is possible thanks to the relative security in the capital.

My presence is possible due to the security and the promise of a political solution. For the first time in 21 years we are close to ending the transition. Mogadishu is free now. 

But emphasizing the point that Somalia remains a country at war a suicide bomber in the city of Beledweyne blew himself up on Tuesday morning in an attack targeting Ethiopian soldiers.

More from GlobalPost: Inside Somalia: Order restored in Mogadishu

Sign up for our daily newsletter

Sign up for The Top of the World, delivered to your inbox every weekday morning.