MOGADISHU, Somalia - Somalia's president fired his prime minister yesterday and accused him of paralyzing the government with "corruption, inefficiency and treason." Hours later, as the government veered toward collapse, Islamic insurgents held a brazen news conference in the capital and vowed never to negotiate with the leadership.

President Abdullahi Yusuf announced his decision in Baidoa, one of the few towns the government still controls. Islamic militants accused of ties to al-Qaeda have taken over most of the country.

"The government has been paralyzed by corruption, inefficiency and treason," Yusuf said. He will name a new prime minister in three days, he said.

Nur Hassan Hussein promised to challenge his dismissal as prime minister, saying the president lacked the authority to fire him. The president said Somalia itself lacked a legal government because too many ministers had already resigned.

"The president was speaking in his usual personal capacity, which is always contrary to the country's existing rules and regulations," Hussein said.

Later in the day, Sheikh Muktar Robow, a spokesman for the al-Shabab insurgent group, held a news conference in the capital, Mogadishu, in open disregard for the government.

"We will never talk to the government and will never accept any political power-sharing. Our aim is only to see Islamic law running this country," Robow said.

Somalia has been without an effective government since 1991, when warlords overthrew a dictatorship and then turned on one another.

Somalia is at a dangerous crossroads. Ethiopia, which has been protecting the Somalian government, has said it would withdraw its troops by the end of this month. That will leave the government vulnerable to Islamic insurgents, who began a brutal campaign in 2007. They have captured most of southern Somalia and move freely inside Mogadishu.

In the past, they have brought a semblance of security to the country, but have done it by carrying out public executions and floggings. On Saturday, fighters loyal to al-Shabab publicly executed by firing squad two men accused of killing their parents.

Civilians have suffered the most, with thousands killed or maimed by mortar shells, machine-gun crossfire, and grenades. The United Nations says there are 300,000 acutely malnourished children in Somalia, but attacks and kidnappings of aid workers have shut down many humanitarian projects.

The lawlessness has allowed piracy to flourish off the coast, with bandits taking in about $30 million in ransoms this year alone.

The United States worries Somalia could be a terrorist breeding ground, and accuses al-Shabab of harboring the al-Qaeda-linked terrorists who blew up the U.S. embassies in Kenya and Tanzania in 1998.

Britain shares that fear. Defense Secretary John Hutton said yesterday at a security conference in Bahrain: "It is a classic area where you have got ungoverned space, no effective state apparatus, and criminality and potential terrorism."