Somalia became independent in 1960 with Mogadishu as its capital . Mogadishu remained the capital of Italian Somaliland throughout the existence of the latter , and became the capital of independent Somalia in 1960 .