A junior minister in Somalia’s interim government handed the port to the Supreme Islamic Courts Council after days of negotiations.
The Islamic group strengthened its hold on Mogadishu on Tuesday when it defeated hundreds of fighters loyal to US-backed militia commanders who had opposed them.
The group now controls the port despite regional leaders saying last month that all armed groups must hand over ports and airports, and other national assets, to the government.
Mogadishu’s port and airport have been closed for 15 years because rival armed groups have been unable to agree who should run them.
Sheikh Sharif Sheikh Ahmed, one of the leaders of the Islamist group: “We are happy and would like to see all other government infrastructure be handed over like this.”
Hundreds of people have returned to their homes in the capital after two days of intense fighting which left more than 70 people dead and 150 wounded.
The Islamic Courts took most of the capital from rival warlords last month.
Somalia has not had an effective central government since opposition leaders removed Mohamed Siad Barre in 1991. The interim government was set up with the help of the United Nations but is virtually powerless outside its base in Baidoa.