Somalia was under British and Italian control until 1960. June 26, 1960 the territory that was controlled by the British was declared Independant. Five days later, July 1, 1960 the other territory of Somalia declared its independance. The two former territories joined, and formed the Somalia Republic.
After WWII, the United Nations (UN) was created to prevent international war crimes, protect human rights, and set a mission to facilitate international social and economic progress. The UN allocated aid to needy countries, that were in economically or socially hurting (partly because they were under control from other countries), such as Somalia. In the 1950s the United Nations decided that the Somalialand would be able to take back their country politically and economically by 1960. So, in 1960 the Italian and British Somalia territories became Independent and gave the land back to Somalia, who were granted the right to self determination and political power over their new formed country.
(I looked this up, and didn't really find a lot of information on the role of Somalia)