MOGADISHU - Thousands of residents fled bomb-blasted north Mogadishu on Tuesday where the worst fighting in months between Islamist militants and the government has killed at least 113 civilians, according to a rights group.

Hardline Islamist group al Shabaab and the government are battling for control of the capital and south Somalia, where 18 years of war has destabilized the region, created hundreds of thousands of refugees, drawn in foreign armies and militants, and spawned an unprecedented wave of piracy offshore.

The Elman Peace and Human Rights Organization said battles between al Shabaab and pro-government forces had wounded 330 people in the Horn of Africa state since the end of last week.

It said at least 27,000 civilians had fled the city.

The bloodshed has caused splits in both heavily armed sides: there was a deadly clash on Monday between police and soldiers, then a rift broke out in the opposition after a veteran warlord stoked rivalries between two insurgent factions.

Sheikh Yusuf Mohamed Siad, also known as Inda'ade or white eyes, handed control of his hundreds of fighters and 19 battle wagons -- pickup trucks mounted with heavy weapons -- to Sheikh Hassan Dahir Aweys, another senior opposition leader.

That angered Shabaab leaders, who are also fighting the country's fragile new government. Washington accuses both Aweys and the Shabaab group of having links to al Qaeda.

Shabaab wants to behead Sheikh Yusuf, said a relative of Inda'ade, Aden Hussein. They ordered (Aweys) to give him up and his weapons, but Aweys said he prefers to fight Shabaab.

The influential Aweys is a member of Hizbul Islam, an umbrella group of opposition organizations that includes his Alliance for the Re-Liberation of Somalia.

CLEANSE MOGADISHU

At stake in Somalia is control of Africa's largest coastline. Apart from pirate ransom revenues, Somalia's main source of income comes from cattle exports to the Gulf, although experts say it may have interesting oil-fields in the north.

Regional nations and outside powers have long battled for influence in Somalia, with its view of strategic shipping lanes linking Europe to Asia.

Since 1991, Somalia has suffered from internal conflicts and occasional interventions by regional nations after dictator Mohamed Siad Barre was overthrown.

On Sunday, al Shabaab, whose name means Youth in Arabic, said it planned to cleanse the capital.

With permission from (God), we will liberate Mogadishu sooner or later and cleanse it from these filthy people, it said in an online statement, according to a translation by the U.S.-based SITE Intelligence Group.

On Monday, new Somali President Sheikh Sharif Ahmed accused the rebels of working for unnamed foreign governments he said were determined to undermine his administration.

More than 16,000 civilians have been killed by fighting since the start of 2007, more than 1 million have been driven from their homes and about 3 million survive on food aid.