The old port is now a military area and is used by the AMISOM troops and government soldiers as a military base.
Heavy weapons were used by both groups in the battle, AMISOM troops even used a tank to defend the base from the extremist attack.
The fighting lasted for at least five hours, residents say. The attack was initiated late in the evening by Al Shabaab forces.
Fighting in the Somali capital has been increasing the last few days.
This fight came out when Hizbul Islam announced to join Al Shabaab fight against AMISOM peacekeepers and TFG troops.