MOGADISHU, Somalia - A foreign suicide bomber killed six guards and a civilian Sunday at a military base in the Somali capital, officials said, an attack that came after two weeks of intense fighting in war-torn Mogadishu.

Two Islamic insurgent forces have formed an alliance and are trying to push the UN-backed government from the capital, which has been heavily shelled in the last two days. Over 150 people have been killed and hundreds injured in the past two weeks, and the UN said the violence has prompted 57,000 Somalis to flee the city.

Abdifitah Ibrahim Shawey, the region's deputy governor and the deputy mayor of Mogadishu, said Sunday's bomber had pale skin, leading authorities to suspect he was one of some three hundred foreigners fighting alongside Islamist insurgents.

Somalia has had foreigners involved in two previous suicide bombings, but they were Somalis from the diaspora. Sunday's attack is believed to be the first time a man of non-Somali origin appeared to be a suicide bomber.

"A suicide bomber driving a car loaded with explosives came at the main gate of a government military base," Shawey said. "He tried to enter the compound, but three government soldiers guarding it denied him access and he immediately blew himself up."

Colonel Abduhalli Osman Agey, a commander at the base, said six soldiers, including the three guards, were killed along with a civilian passer-by.

Somalia has not had a functioning government since 1991, when warlords overthrew a socialist dictator and then turned their clan-based militias on each other.

Somalia's two main Islamist insurgent groups, the Islamic Party and al-Shabab, formed an alliance a month ago to overthrow Somalia's new government, headed by their former ally President Sheik Sharif Sheik Ahmed. They consider Ahmed a traitor for signing a peace deal that paved the way for him to become president earlier this year.

The United States worries that Somalia could be a terrorist breeding ground, particularly since Osama bin Laden declared his support for the Islamists. The U.S. accuses al-Shabab of harboring the al Qaeda-linked terrorists who allegedly blew up the U.S. embassies in Kenya and Tanzania in 1998.