Somalia's prime minister on Saturday accused Egypt, Libya and Iran of providing weapons to Islamic militants who have seized control of much of this country's south, the latest allegation that the nation is being torn apart by outsiders.

"Egypt, Libya and Iran, whom we thought were friends, are engaged in fueling the conflict in Somalia by supporting the terrorists," Mohammed Ali Gedi said. He cited unnamed sources in his government and offered no proof.

The accusations came as Somalia's already-weak government has been unraveling. Two lawmakers were shot this week — one fatally — and Gedi was facing a no-confidence vote after 18 lawmakers resigned from his administration in disgust, saying it has failed to bring peace.

The leader of the Islamic militia, Sheik Hassan Dahir Aweys, denied receiving support from foreign countries and said Gedi was "trying to distract attention from his own troubles."

The United States and other Western powers have cautioned outsiders against meddling in Somalia, which has no single ruling authority and can be manipulated by anyone with money and guns. But there is little sign the warning has been heeded.

U.S. Assistant Secretary of State Jendayi Frazier said Saturday that both sides in the conflict have "invited in foreign forces" and that "neither the Union of Islamic Courts nor the transitional federal government can take the high ground."

"They've all been backed by foreign forces," she said Saturday from Kinshasa, Congo. She gave no specifics.

John Prendergast, a senior adviser with the International Crisis Group, said this week that the frequent intervention in Somalia has contributed to a double standard among political factions, which secretly look for outside support but publicly decry "foreign influence."

The Islamic militia has rallied its supporters by condemning reports that Ethiopian troops have entered the country to protect the government. Ethiopia is Somalia's traditional enemy, but Somalia's president has asked for its support — a decision that infuriated many Somalis.

The government, in turn, accuses the Islamic militia of receiving weapons from Eritrea. Ethiopia and Eritrea fought a bloody border war from 1998-2000, and have since backed rebel groups to destabilize each other.

Abdallah Isaaq Deerow, the politician who was killed Friday, was "an ardent supporter of close ties with Ethiopia," his friend, Ali Mohamed Ahmed Daon, told The Associated Press. Deerow was a secondary school teacher before entering politics in the 1990s.

Nine people have been arrested in Deerow's death, but authorities had no further details, according to Police Chief Aadin Biid.

On Wednesday, Mohammed Ibrahim Mohammed, chairman of the parliamentary committee for constitutional affairs, was shot and wounded. It was not immediately clear whether the shootings were connected, although the men had worked together.

Saturday's funeral for Deerow forced officials to postpone a scheduled vote in parliament on a no-confidence bill against Gedi. Nobody spoke at the funeral.

Somalia has been without an effective central government since warlords toppled dictator Mohamed Siad Barre in 1991 and then turned on each other, carving much of the country into armed camps ruled by violence and clan law.

The government was established nearly two years ago with the support of the U.N. but has failed to assert any power outside its base in Baidoa, 250 kilometers (155 miles) from the capital, Mogadishu.

Meanwhile, the militia, known as the Supreme Islamic Courts Council, has steadily gained power and influence, raising fears of an emerging Taliban-style regime. The United States accuses the group of harboring al-Qaida leaders responsible for deadly bombings at the U.S. embassies in Kenya and Tanzania in 1998.