Ethiopia is to withdraw from areas it has recently captured in neighbouring Somalia with its troops to be replaced by African Union (AU) soldiers.
The decision was made by the AU's Peace and Security Council, which met to finalise boosting its Somali force.
It wants the UN to approve a new figure of 17,731, which would include the absorption of Kenyan troops.
They entered the country in October in pursuit of al-Shabab militants, who control much of southern Somalia.
The al-Qaeda-linked group is now battling on several fronts, with forces from Kenya and Ethiopia, as well as local militias, taking ground recently.
The UN-backed interim government only controls the capital thanks to the AU force (Amisom) in Mogadishu.
Ethiopia originally sent troops to Somalia in 2006 to oust Islamist forces but withdrew in 2009 after suffering heavy casualties.
Their presence was particularly controversial in Somalia because the two countries fought a border war in the 1970s.
Somalia has not had a functioning central government for more than 20 years and has been wracked by fighting between various militias.'Strengthen gains'
Ethiopia took the strategically important central town of Beledweyne from al-Shabab in December, nine months after wresting the border town of Bulo Hawo from the group.
Somali Prime Minister Abdiweli Mohamed Ali is in Beledweyne on Friday - a rare visit outside the capital, which correspondents say shows the government's growing confidence in its fight with al-Shabab.
The AU said its plans for strengthening Amisom would boost "gains made on the ground".
Amisom troops would occupy "areas liberated with the support of Ethiopia, in view of the urgency of the stated intent of Ethiopia to withdraw from those areas", a statement said.
A total of 5,700 extra soldiers are to join Amisom - to be made up of Djiboutians and the Kenya troops already in Somalia, as well as a small police contingent, the AU said. Djibouti had originally agreed to send 1,500 troops - of which 200 are already in Mogadishu.
No mention was made in the comminque of a 1,500-strong contingent promised earlier by Sierra Leone.
A UN-brokered peace conference at the time of Ethiopia's withdrawal from Somalia in 2009 saw the election by MPs of moderate Islamist president Sheikh Sharif Sheikh Ahmed.
But it has been dogged with factional infighting - and the UN Security Council has said it will withdraw its funding for it unless there are serious effort to meet an August 2012 deadline to draw up a political roadmap, which should lead to elections for a new president and parliament.
Al-Shabab, which has imposed strict Sharia law in areas it controls, announced a "tactical withdrawal" from Mogadishu in August after fierce fighting with AU forces.
It has denied allegations that it was behind a spate of kidnappings from Kenya soil and said it regarded Kenya's incursion as an invasion.