MOGADISHU, Somalia (AP) _ Three trucks loaded with 49 tons of donated food were ready to roll out of Mogadishu's port, but gunmen blocked the way.

The starving people of Somalia's capital would have to wait another day.

It seems only firearms can guarantee a steady food supply in Mogadishu, where rival gangs with machine guns milled about just outside the port gate, sizing up the convoy like lions on the prowl. It was the second day they had blocked its movement.

This is anarchy. This is Somalia.

The impoverished nation that forms Africa's eastern horn is an ongoing riot of self-inflicted misery, descending into ever greater chaos by the day.

With 1.5 million people facing starvation and no functioning government, Somalia cannot save itself. And help from abroad is painfully slow in arriving.

''This is the worst place in the world right now,'' said Omar Abdule, an accountant before Somalia imploded with the overthrow of dictator Mohammed Siad Barre in January 1991.

''People are starving in the desert and they are fighting in the city. No one cares about us because we are a poor country,'' said Abdule, now a worker with the International Red Cross.

Somalia's crisis is a mix of Beirut's factional anarchy and Ethiopia's devastating famine, horrors that engulfed those areas in the 1980s.

Chaos reigns in the capital, where the crackle of gunfire night and day has become background music. There is no police force or army. The jails have been emptied. The telephone system has been destroyed. Electricity is available only to a lucky few with generators.

Many upper and middle-class Somalis have fled the country and their white- washed villas, replaced by surging numbers of desperate poor who have moved to the city and erected crude shelters in every available space.

The streets are controlled largely by warring clansmen and bandits, many of them teenagers shouldering automatic rifles and joy-riding in vehicles mounted with machine guns.

''Give a 12-year-old a gun and all other forms of authority cease,'' said Jim Newton of World Vision, the U.S.-based charity that was trying to move the food out of the port.

It wasn't the first delay. The French ship that finally unloaded the food Thursday had been anchored for days outside the port, the captain wary of attack if he docked.

Rival warlords, Ali Mahdi Mohamed and Gen. Mohamed Farrah Aidid, occupy the north and south sides of a capital that stretches along the Indian Ocean coast. But neither can control their own maurading bands, let alone stamp their authority on the city.

Most of the countryside is controlled by still other clans, as Somalia fractures and retreats to an age-old system of clan rule, leaving it unrecognizable as a modern nation.

Supporters of Ali Mahdi have been waging vicious street battles among themselves all week in northern Mogadishu over an issue unclear to outsiders, or perhaps even to themselves.

On the south side of the ''green line,'' a city-splitting border with a name borrowed from the Beirut conflict, some of the heaviest fighting in months erupted this week in the Medina district.

It started Monday, apparently with a robbery and a car theft, and spread into an orgy of revenge and counter-revenge by the families and sub-clans involved.

After months of negotiations with the United Nations, Ali Mahdi and Aidid have agreed to allow 500 armed U.N. soldiers to come to Somalia to protect food distribution.

But they will be confined to Mogadishu and their role will be limited to guarding the food shipments, not resolving the political conflict that is the main cause of famine in this nation of 6 million people.