"The United States strongly supports the transitional federal institutions in Somalia, because they are trying to reestablish a functioning central government within Somalia that can bring the Somali people out of the period of civil conflict," White House spokesman Tony Snow said at a press conference.
Snow said that Washington has long been concerned that ongoing unrest could turn lawless Somalia into a haven for terrorists.
"You've got instability in Somalia right now, and there is concern about the presence of foreign terrorists, particularly al-Qaeda, within Somalia," Snow told reporters.
"In an environment of instability, as we've seen in the past, Al-Qaeda may take root, and we want to make sure that Al-Qaeda does not in fact establish a beachhead in Somalia," he said.
"These are problems that we've seen in other ungoverned regions in the past. The terrorists are going to seek to take advantage of the environment and use that kind of chaos in order to put together camps and therefore mount operations around the world," the spokesman added.
"We will continue to work with regional and international partners wherever we can to crack down on terrorism and also to try to prevent its rising," Snow said.
Somalia has been engulfed by deadly violence, with the latest surge of violence over the past several days around the capital Mogadishu killing nearly 140 people.
The US spokesman on Wednesday skirted questions as to whether the United States was supporting one of the parties in the conflict the Alliance for the Restoration of Peace and Counter-Terrorism (ARPCT).
The horn of Africa nation of some 10 million people has been without a functioning central authority since the 1991 fall of strongman Mohamed Siad Barre plunged it into anarchy, with warlords battling for control of a patchwork of fiefdoms.
More than a dozen attempts to restore stability have failed, and the current government has been racked by infighting and unable to assert control.
Snow said that the unrest in Somalia has implications for US security interests.
"The president has said that his primary responsibility as commander-in-chief is to keep the American people safe. That's a solemn task," he said.
He added: "In the long run, the answer to your concerns is an effective, functional government of Somalia, which obviously we do not at the moment have."