The port is nominally controlled by three groups - the port police of the former regime of fallen dictator Siad Barre, fighters linked to the Mogadishu warlord Mohamed Farah Aideed, and the Hashaamud - a mixed group of gunmen from a variety of clans.
But a number of freelance gunmen and gangs lie in wait on the fringes - human scavengers waiting for a chance to pounce.
The most notorious and feared of these is a group of cripples, at least 50 strong, who live together to one side of the port compound in a village of abandoned shipping containers. Most are fighters who lost limbs in the battle to depose Siad Barre and have now been forgotten in a country that has since dissolved into murderous anarchy.
'They are mean. They were wounded in the fight against Siad, promised the earth, but have found themselves limbless in the dirt,' said Steve Tomlin, relief coordinator for the American charity International Medical Corps. Mr Tomlin and aid relief workers say the group is desperate and has no qualms over shooting to kill for the most meagre scraps of food or goods that can be traded. 'In many ways, they are symbols of Mogadishu today.'
The cripples and the other forgotten helpless of this bombed- out, ruined capital, where only the gun now rules, see aid organisations bringing in food for dying babies, but not for them. 'They are a very bitter group and very, very dangerous.'
Sitting in his wheelchair in the shade of a rusty, battered container, near the blocked-off entrance to the quayside, Mahed Adan, a 20-year-old member of the gang, said he lost his leg in the battle to oust Siad Barre. 'It was two years ago,' he said, an AK-47 lying menacingly across his lap. 'Now, I have nothing.'
The three main security groups, totalling about 900 men, rotate the patrolling of different sections of the port.
Aid organisations have to pay the guards to protect the cargo as it comes off the boats and on to trucks that are supposed to take it to nearby feeding centres. Almost every day, someone is shot in a squabble over a loose bag or a quarrel over payment.
One day this week, at least 10 people died when teenage gunmen, in a vehicle with the roof sawn off and an anti-aircraft gun bolted on to the back, tried to stop another group entering.
'It's incredible . . . you just can't tell what is going to happen,' said Ian Cameron, a worker with the International Committee of the Red Cross. 'One moment it's quiet, next all hell has broken loose and a few people are lying dead.'
Aid organisations say everything has to be negotiated time and time again as agreements constantly fail. Food cannot be stored in warehouses or it will be looted.
'The port is an extremely volatile and unpredictable place,' said Ian Macleod, of the United Nations Children's Fund. 'Our priority must be to get it sorted out, it is the most important facility for getting food into Somalia.'
The UN has agreed to send 500 armed Pakistani troops to control the port and escort food convoys to distribution centres, where scores of children die each day. But relief workers say the UN does not really have a plan of what to do with the groups who stand to lose out or a clear idea of what mandate the troops should have.
'The looting will not stop because of the arrival of Blue Berets. If they want to stop it and bring security to the port, they will have to be very well-armed and able to go on the offensive,' Mr Tomlin said.