MOGADISHU, SOMALIA, JAN. 29 -- Three days after the fall of Somalia's ruler Mohamed Siad Barre to rebel forces, this sun-swept capital on the Indian Ocean remains full of human agony and lingering scenes of horror.

Lime-covered corpses of slain government soldiers lie in the middle of Sinai Road near downtown, three blocks from a vacant lot where chickens peck amid the unburied bodies of a dozen civilians executed by soldiers -- men and women, shot in the head, their hands bound behind their backs with faded strips of cotton.

This is a city where lawlessness prevails. The presidential palace, Villa Somalia, has been ransacked. Bodies of government soldiers there are bloated in the heat.

Shop after shop downtown has been stripped of valuables by gun-toting looters, who emerged as the Barre government lost control over this strategic, nearly Texas-sized country on the Horn of Africa where civil war has raged for six years.

Today, the city's bandits appeared to concentrate their work on the Central Bank and Ministry of Finance, gathering by the score in the sultry surrounding streets to collect heaps of paper Somali shillings blowing with the sea breeze like autumn leaves.

"Please, don't go down there!" warned Abdul Osman, 33, an economist and representative of the victorious United Somali Congress rebels who chased Siad Barre and his troops from the city Saturday night. "It's not safe. We cannot guarantee your life."

Amid this anarchy and the faint but ubiquitous stench of death that fouls the air, the dusty streets are littered with debris from the violence -- huge chunks of masonry and shards of glass, dangling electrical wires, heavy branches and limbs shorn from trees by artillery shells, abandoned tanks and armored personnel carriers and dozens of smashed trucks and cars riddled with bullet holes -- freshly spray-painted with the rebel initials, "USC."

Citizens, including children, tote, tug and wheel the most inexplicable array of ill-gotten trophies through the city streets -- washing machines, a piano, beds, grease-laden electric generators, silverware sets, light fixtures, armsful of books from a downtown library.

And everywhere in this devastated city, day and night, automatic weapons crackle, fired by rebels and armed civilians, most of them celebrating the fall of Siad Barre.

Everyone in town seems to have a gun.

"I never would have thought anything like this would be possible in my country," said Abdi Hussein Mumin, a 27-year-old accountant who returned last month after several years in Botswana. "The hard part is over. Siad Barre is gone. Now we must start to build again."

Today, as their forces chased the octogenarian Siad Barre toward the southern town of Kismayu, the rebels chose and swore into office a new president, 52-year-old Ali Mahdi Mohamed. Mahdi owns a hotel chain, and is a prominent opposition politician and member of the Hawiye clan that makes up the rebel movement.

As a crowd of Somalis looked on in a meeting room at police headquarters downtown, Mahdi, a gentle, soft-spoken figure wearing leather sandals and a plain cotton shirt, placed his right hand atop a clothbound Koran and swore to "put the interest of the Somali people first, and not myself."

To exultant shouts of "God is great!" the new president was swarmed by his joyous countrymen, who took turns hugging him and shaking his hands, a few with tears in their eyes and automatic weapons strapped to their backs.

Mahdi said he would lead an interim government based on "equality, democracy and justice" and convene a conference of all opposition groups to map out a political agenda. He also said national elections to choose a new government would be held "as soon as possible."

There was no indication yet whether rebels of the northern-based Somali National Movement and the southern-based Somali Patriotic Movement would back the new regime, which has its roots in the central region. Their reaction is considered critical. The major regional clans have determined the balance of political power here.

Mahdi named Umar Arteh Ghalib, a northerner and former political prisoner who was Siad Barre's last prime minister, to form the interim government.

Siad Barre, a member of the minority Marehan clan, proved adroit at playing Somalia's major clans off against each other, allegedly resorting to ruthless methods at times to suppress opposition.

Today, Mahdi promised that "those days are finished . . . . The nation will forget the hardships of Siad Barre."

Forgetting hardship in Mogadishu, however, likely will be a long and arduous process, for hardship is everywhere.

Hardly a house, hospital, school, foreign embassy or store is untouched by looters or automatic-weapons fire. Block after block of the capital's whitewashed buildings are scarred, smashed and cratered -- ghastly evidence of the heavy artillery fire the city of 1 million endured during the past month, when the rebels pressed their final offensive.

Barre's men penned in the compound of the president's palace on a walled downtown hilltop and last week fired, apparently indiscriminately, scores of artillery shells around the capital, according to civilians.

"This was not a war between soldiers. It was a war against women, children, old men," said Huber Wilhelm, Italian-born director of the only hospital still functioning here, a pediatric and maternity clinic where an average of 150 wounded civilians arrived each day during the last two weeks of shelling.

The courtyard and hospital walls are splattered with blood. The operating room is pockmarked with bullet holes made, Wilhelm said, by frantic government soldiers searching for valuables.

The hospital resounds with the cries of civilians wounded by shells or bullets, many of them lying among newly arrived corpses on cots placed haphazardly in an inner courtyard. During a brief interview with Wilhelm, four new patients were wheeled or carried into the hospital, all with bullet wounds.

A 3-year-old boy, Habil Dahir, wept in agony from a deep wound in his left foot, caused accidentally, his aunt said, "by men practicing their guns." The worst, Wilhelm said, may be yet to come: with no water or electricity in the city, and with severe shortages of food and medicine, physicians fear disease and malnutrition.

Just outside the hospital gate is a temporary graveyard where dozens of corpses are barely covered with dirt. "The shelling was so bad last week," said an orderly, Abdul Aden, that it wasn't safe to take the bodies to the hospital's impromptu mass grave a half-mile away.

Estimates of how many died were vague. "Hundreds. Thousands," said Osman, the economist and rebel representative. "Don't you think this is a heavy price?"

It was Saturday night, after a two-week stalemate in the fighting, when the rebels finally decided to assault Siad Barre's Villa Somalia palace, according to Osman.

"For three weeks we offered to let him go if he would allow a new government to take over," said Mohamed Godeh Barre, another rebel leader, who said 100 elders of the country's major clans met earlier this month to arrange a new interim government. "We said, you can go to avoid more blood . . . . He never listened to reason. All the time he said, 'cease-fire,' but his people were shooting the shells."

At sundown the rebels scaled the white walls of the compound and attacked Siad Barre's elite bodyguards, known as the Red Hats for the crimson berets they wore.

Apparently sensing the end, Siad Barre, his family, closest aides and troops escaped the compound in a convoy of about 50 cars and armored personnel carriers, stopping at an airport barracks before continuing south out of the city.

Today, three days later, evidence of the terror and violence of that night remains on the grounds of the presidential compound: scores of spent artillery shells, the burned wreckage of an armory filled with ammunition casings labeled "Made in America" and red berets and uniforms, stripped off by soldiers trying to melt into the populace.