One resident, Daud Haji Ibar, said: "There was no big fighting, but the government soldiers have left the western part of Balad Weyne and the al-Shabab men are in control."

Witnesses said they saw Ethiopian troops entering Somalia, identifying them by their uniforms and vehicle licence plates. However, Ali Mohamed Gedi, a spokesman for the regional government of Balad Wayne, denied the claims.

Control of Balad Weyne gives a military advantage because of its proximity to Ethiopia, which has sent troops over the border in the past in support of government troops.

Balad Weyne also serves as a link between southern Somalia and the agriculturally rich central region.

The latest clashes come amid a vast counter-offensive against al-Shabab strongholds in the centre and south of the country.

Somalia has been under a state of emergency since Wednesday.

Emergency rule allows Sheikh Sharif Ahmed, the president, to make major decisions without consulting the parliament.

Violence in Somalia has killed at least 18,000 civilians since the start of 2007 and displaced at least one million others.