 In 1940 , the Italo @-@ Somali population numbered 22 @,@ 000 , accounting for over 44 % of the city 's population of 50 @,@ 000 residents . Mogadishu remained the capital of Italian Somaliland throughout the latter polity 's existence . In World War II it was captured by British forces in February 1941 . 
