MOGADISHU - One of Mogadishu's last warlords holding out against powerful Islamists surrendered after losing most of his territory in two days of fighting that killed more than 140 people, militia sources said today.

"It has become necessary to surrender and give peace a chance," a militiaman loyal to warlord Abdi Awale Qaybdiid told Reuters.

Qaybdiid is the last of an alliance of US-backed warlords who called themselves an anti-terrorism group. He kept fighting after the Islamists routed the other warlords and seized the Somali capital last month.

Displaying weapons seized from Qaybdiid, the Islamists said their victory was a turning point for Mogadishu -- one of the world's most dangerous cities -- and called on remaining rival fighters to surrender.

"From today onwards, we promise the world that this city is safe," said moderate Islamist leader Sheikh Sharif Ahmed.

"We need to overcome tribalism and the Somali enemies. There are so many enemies and in order to defend ourselves against them we need to unite."

While Qaybdiid surrendered, his former alliance counterpart Mohamed Dheere handed his arsenal and about 420 militiamen to the interim government at its base in Baidoa, about 240km northwest of Mogadishu.

"I can confirm that Mohamed Dheere has arrived in Baidoa. He has handed over his militias and around 35 technicals," government spokesman Abdirahman Dinari said, referring to the heavily armed pickup trucks that are Somalia's version of tanks.

Security sources said Dheere had come from an area to the north along the Ethiopian border, where he has been regrouping since the Islamists ran him out of his stronghold in Jowhar last month.

Jowhar, north of Mogadishu, was one of the key towns seized by the Islamists as they swept across a strategic swathe of Somalia after taking Mogadishu on June 5.

Their control has challenged the slim authority of the internationally backed interim government, formed at peace talks in Kenya in 2004 and based in Baidoa because it is too weak to go to Mogadishu.

Tension between the two sides has arisen over the issue of foreign peacekeepers, which the government wants to help it establish authority and the Islamists have refused.

The Islamists, trying to take complete control of Mogadishu, on Sunday ambushed Qaybdiid's fighters and those loyal to Interior Minister Hussein Aideed, also a deputy prime minister.

The fighting with heavy artillery, mortars and machineguns killed at least 140 people and wounded 150 others, Ali Moallim, a senior administrator at Madina hospital, told Reuters. He expected the toll to rise.

Militia sources said Qaybdiid agreed to surrender after talks between the Islamists and elders from a part of his clan. Scores of his fighters did the same.

Qaybdiid's allies would not discuss his whereabouts.

Witnesses said Qaybdiid's surrender meant the Islamists now control nearly all of Mogadishu except for a small area near the presidential palace, overseen by Aideed's fighters.

"Mogadishu has fallen to the Islamists except the Villa Somalia," Aideed aide Mohamed Abdilahi said, adding that the building could be the Islamists' next target.

Aideed is based in Baidoa but his militia guard the Villa Somalia, the residence of past presidents until Aideed's father and other warlords toppled dictator Mohamed Siad Barre in 1991 and ushered in an era of anarchy.