* Split comes after Mogadishu withdrawal
* Leader vows attacks against govt troops, peacekeepers
* Security incidents creeping up in capital
MOGADISHU, Aug 30 (Reuters) - The leader of al Shabaab militants in Somalia, who were driven out of the capital last week, on Tuesday lambasted fighters who he said had given up hope of victory and abandoned the struggle.
Sheikh Muktar Abu Zubeir, in an audio message sent to media, said his fighters would keep up attacks against government troops and foreign peacekeepers despite the retreat.
His comments showed the divisions within the al Qaeda-affiliated group's ranks as government forces and African Union peacekeepers battled them in the capital, ultimately forcing them to withdraw from most of their bases there.
"This new phase of fighting has also split people into two groups. Al Shabaab -- a faithful group that says the real fighting has just started and believes God's promise that there will be a victory at the end, and a hypocrite group that lost hope and believes there will be no victory," Abu Zubeir said in the message on the eve of Eid, the end of the Muslim holy month of Ramadan.
Analysts said they expected al Shabaab, which still controls large swathes of south and central Somalia, to return to Mogadishu and adopt guerrilla tactics.
It was not immediately clear how big Abu Zubeir's following now was but he said he would carry out more attacks against his sworn enemies, government troops and AU forces.
"We didn't abandon the fighting and we aren't weak. We are now launching a new phase of fighting against you which will prove to be your end," he said.
Abu Zubeir's issued his warning as thousands of Somalis were returning to Mogadishu, having fled fighting which has killed more than 20,000 people since 2007, according to U.N. estimates.
Government troops and AU peacekeepers acknowledge they do not control all of Mogadishu and there are still some pockets of resistance.
On Saturday, Somali police seized a car laden with explosives in an area that is considered the safest in Mogadishu, housing many U.N. agency buildings and bases for AU peacekeepers.
A day later, a roadside bomb missed an AU convoy and killed a woman.
Abu Zubeir also criticised aid agencies struggling to help provide Somalis with food aid in famine-hit southern Somalia as the Horn of Africa experiences its worst drought in decades.
Of 3.7 million Somalis at risk of starvation, about nearly three million are in southern rebel-controlled territory, beyond the reach of aid agencies.
Al Shabaab had imposed a ban on aid groups saying they created dependency. It later lifted it as the food crisis hit critical levels, only to apparently to renege on it.
"Aid agencies and some countries declared famine and pretend they want to help you. They do so for these reasons: for trade purposes, to convert you from your religion and to colonise you," he said. (Additional reporting by Abdi Sheikh in Mogadishu; Writing by Yara Bayoumy; Editing by Angus MacSwan)