The African Union backed Somalia's request to slow the withdrawal of its troops fighting Islamist militants and called for a new international force to replace the AU peacekeeping mission.

Al-Shabaab, an Al-Qaeda-affiliated group, has been waging a deadly insurgency against the fragile central government in Mogadishu for more than 17 years.

UN resolutions called for forces in the African Union peacekeeping mission, known as ATMIS, to be reduced to zero by December 31 with security handed over to the Somali army and police.

The third and penultimate phase was to see the departure of 4,000 soldiers out of a total 13,500 ATMIS troops by the end of June.

But, following a request from Somalia's government to see only 2,000 troops leave in June and the remaining 2,000 withdraw in September, the AU Peace and Security Council (PSC) said in a statement Thursday that it "strongly supports... a phased approach" to the drawdown.

ATMIS, whose main direct financial contributor is the European Union, derives its mandate from the AU but must also be authorised by the UN Security Council.

Somalia's beleaguered federal government has joined hands with local clan militias to fight the Islamists in a campaign supported by US airstrikes.

But the offensive has suffered setbacks, with Al-Shabaab earlier this year claiming it had taken multiple locations in the centre of the country.

The AU called for "the establishment of a new African Union-led Mission for Somalia... for post-ATMIS security arrangements that should be UN-authorised".

It asked parties including the Somali govenment to come up with a plan for the new force by the end of next month, urging "clear benchmarks and timelines for the transition from ATMIS to the new mission as well as the duration of the new mission."

ATMIS comprises troops from Burundi, Djibouti, Ethiopia, Kenya and Uganda.

Although driven out of the capital by AU forces in 2011, Al-Shabaab still has a strong presence in rural Somalia.

It has carried out repeated attacks against political, security and civilian targets, mostly in Somalia but also in neighbouring countries including Kenya.

Last week in southern Somalia, Al-Shabaab planted a roadside bomb that killed six soldiers including a senior military commander.