"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.
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."
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, 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 Qaeda leaders responsible for deadly bombings at the U.S. embassies in Kenya and Tanzania in 1998.
The militia has rallied even more supporters in recent weeks by condemning reports that troops from neighboring Ethiopia have entered the country to protect the fragile government. Ethiopia is Somalia's traditional enemy, although 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. Somalia could become a new front in their conflict.
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.
Earlier Saturday, the prime minister was among hundreds who attended Deerow's burial. Nobody spoke at the service.
Nine people have been arrested in Deerow's death, but authorities had no further details, according to Police Chief Aadin Biid.
Two days earlier, 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 forced officials to postpone a scheduled vote in parliament on a no-confidence bill against Gedi.