MOGADISHU, Somalia (AP) _ Everyone is saying the right things and bending over backward to make sure the U.N. takeover of the U.S.-led relief effort in Somalia works.

So why are people worried things may fall apart, that in a year, the country could be back to where it was when troops arrived Dec. 9?

The multinational coalition faced an uphill fight to create a safe environment for food supplies to reach the starving in a country devastated by civil war and plagued by bandits. The challenge facing the United Nations, which formally took over Tuesday, sounds even more monumental:

-A significant number of Somalis remain hostile to outsiders. From rock- throwing youngsters to armed robberies of aid agencies by laid-off workers, violence has become a part of everyday life.

-While strong progress has been made in getting a Somali police force back on the streets, the officers desperately need some training. The rehabilitation of the court system remains in its infancy.

-Progress toward establishing a new government has been slow. Elections are probably two years off.

-Too many kids are getting their only lessons on the streets. Schools are getting started, but there's a lot of catchup ahead.

-Most of the Americans, who have generally gained a reputation for being tough but fair, have gone. From a peak of more than 25,000, fewer than 5,000 remain after the departure of Operation Restore Hope's top brass following Tuesday's hand-over ceremony.

-The exodus leaves the U.N. operation in Somalia with under 22,000 troops, below the 28,000 projected for the rebuilding and reconstruction effort under Operation Continue Hope. The U.N. has run into some trouble nailing down commitments from donor countries.

There's little doubt Operation Restore Hope has been a success, at least by former President Bush's criteria last December when he announced he was dispatching U.S. troops:

''First, we will create a secure environment in the hardest-hit parts of Somalia, so that food can move from ships overland to the people in the countryside now devastated by starvation.

''And second, once we have created that secure environment, we will withdraw our troops, handing the security mission back to a regular peacekeeping force.''

The troops accomplished both goals in a country where an estimated 350,000 people died last year from civil war, starvation and disease.

Marine Lt. Gen. Robert Johnston, the coalition commander, is proud of the changes his troops brought about in Mogadishu.

''It's like night and day,'' Johnston said in his farewell address. ''We've given the city back to the Somalis. You can see it as marketplaces begin to grow. Somalis are painting and rebuilding their houses.

''I am also aware that while this is a successful mission, it will not be truly successful until (the U.N. operation) takes over and continues to demonstrate we have the capability and will to make sure that Somalia has the will to get back on its feet for the long haul.''

There were stark reminders Tuesday of the lingering dangers.

U.N. special envoy Adm. Jonathan Howe began his address with a moment of silence for the eight Americans and 10 soldiers from other countries who lost their lives during Operation Restore Hope.

Cpl. Michael David Abel, 27, of Sidney, British Columbia, became the 18th fatality when he was accidentally shot Monday by a fellow Canadian soldier cleaning his rifle in Belet Huen.

And the Dutch branch of Doctors Without Borders said it has suspended its aid project in Baidoa, 120 miles west of Mogadishu, and removed its 10 relief workers there because of frequent death threats.

A Somali nurse working for the group was killed two weeks ago.

''The increasing danger in Baidoa is a direct result of the fact that the ... U.N. intervention operation until now has not been able to lay a groundwork for peace in Somalia,'' the group said, citing the lack of a court system or effective police force.

The threat of violence persists, and Somalis worry that their country could easily slip back into the quicksand of clan violence.