Sheikh Mukhtar Robow, a spokesman of the al-Shabab, said: "The town is completely in our hands. We have taken control of Baidoa today."

His group has vowed to carry on fighting and impose its strict version of Islamic law throughout the country.

Due to the poor security situation, Somalia's parliament has been meeting in neighbouring Djibouti, aiming to elect a new president following the resignation of Abdullahi Yusuf Ahmed last month. 

Next president

On Monday, the parliament voted to double its size, allowing 200 members from the opposition Alliance for the Re-Liberation of Somalia (ARS) to join. 

In depth


Timeline: Somalia

Seventy-five seats are to be filled by other opposition and civil society members later.

The United Nations is mediating between the different sides in Djibouti.

Ahmedou Ould-Abdallah, the UN's envoy to Somalia, welcomed the parliamentary reform.

"I am extremely encouraged by this vote and I would like to thank Somalia's leaders, the parliamentarians and all those who have helped work towards such a positive step," he said.

After the new members are sworn in, the parliament is expected to elect a new president.

Sheikh Sharif Ahmed, the head of the Islamic Courts Union and the more moderate wing of the ARS, announced on Monday that he would be running for the  country's presidency after the parliament voted to accept members of the opposition alliance.

"I will do all that I can to serve honestly if elected president," Ahmed said.

At least 16 other candidates, including Nur Hassan Hussein, the current prime minister, and his predecessor Ali Mohamed Gedi have also shown interest in becoming the next president.