"In essence, the capture of Jowhar which was one of the last strongholds of the president, means the government is quickly losing ground in the battle for Somalia and it is also virtually surrounded by al-Shabab militias who have been strengthening and consolidating their hold.

"There have been many people who had been returning to the capital and now they are being forced to go back to where they came from."

One resident told the Reuters news agency that there had been "serious fighting" in Jowhar in which at least seven people had been killed.

Rebel onslaught

Farhan Mohamoud, the Somali information minister, told Al Jazeera that he hoped the local community in Jowhar would fight back against "the invaders".

In depth

 Profile: Sharif Ahmed
Timeline: Somalia
Restoring Somalia
A long road to stability
Al-Shabab: Somali fighters undeterred
 Somaliland: Africa's isolated state

"There have been a lot of skirmishes in central Somalia ... and there have been a lot of uprisings against al-Shabab, the communities everywhere are organising themselves to defend [themselves].

But, Ali Moalim Hassan, a town elder, told the AFP news agency that control of the town had been effectively ceded to al-Shabab after "the other Islamist militia backing the government deserted their positions".

Al-Shabab is said to have attacked Jowhar on two fronts early in the morning and took over the prison and released detainees.

"Three civilians died and seven were injured after mortars targeting the police headquarters hit civilians," Abdulahi Mohamed Jis, a witness told AFP.

The government is thought to be attempting to bring in reinforcements to retake the area and contain the opposition fighters.

Jowhar is the home town of Sharif Ahmed, the president, and in 2005 it was chosen as the temporary location for the country's transitional government.

The Somali government has been losing ground in recent weeks and now controls little more than the centre of the capital, with the support of African Union troops.

New offensive

On May 15, Somalia's president appealed to al-Shabab to negotiate as sporadic fighting continued in Mogadishu.

"[The council expresses] concern at the loss of life and the worsening humanitarian situation arising out of the renewed fighting"

UN security council

More than 100 people were killed and at least 30,000 displaced in the clashes that started on May 7.

The government control part of Mogadishu and the border town of El Berde, while allied militias control areas in central Somalia.

However, al-Shabab, which has vowed to topple Ahmed, controls much of the south of the country.

The UN Security Council has voiced concern about reported arms supplies to al-Shabab by neighbouring Eritrea.

Eritrea rejects the accusations that it sends weapons to the al Qaeda-linked groups fighting Somalia's government.

The council expressed "concern at the loss of life and the worsening humanitarian situation arising out of the renewed fighting".

Somalia has not had an effective government since 1991, when Mohamed Siad Barre was overthrown by armed groups who then turned on each other.