Al-Shabab, Mogadishu, Somalia, June 21, 2015
A Somali soldier stands guard next to a site where al-Shabab militants carried out a suicide attack on a military intelligence base in Mogadishu, June 21, 2015. Mohamed Abdiwahab/AFP/Getty Images

MOGADISHU, Somalia (Reuters) — The Islamist militant group al-Shabab seized control of two towns in southwestern Somalia over two days, a representative of the group and local officials said Saturday, less than a week after its fighters attacked an African Union (AU) base in the same area. Al-Shabab said it had seized two small towns in the Lower Shabelle region — El Saliindi, 40 miles south of Mogadishu en route to the port town of Marka, and Kuntuwarey, on the road between the capital and the port of Barawe.

The militant group, seeking to overthrow the Western-backed government in Somalia and impose its strict version of Islamic law, stages regular attacks on the AU-led peacekeeping force and on Somali officials as the country struggles to rebuild after more than two decades of chaos.

Ali Nur, the acting governor of Lower Shabelle, confirmed the towns had been captured. "It is sad to say al-Shabab has taken El Saliindi. AU forces withdrew, and al-Shabab now controls it," said Nur, adding that Kuntuwarey had been seized Friday.

Also Saturday, the militants attacked an AU convoy outside Marka, claiming they killed several soldiers in the attack. But Nur said the death toll had not been determined. "A roadside bomb targeted an AU vehicle as the AU convoy passed in the outskirts of Marka today. We do not know details about casualties," Nur said.

The AU peacekeeping force, called Amisom, could not immediately be reached for comment.

Sept. 1, al-Shabab stormed an AU base about 55 miles south of Mogadishu, killing at least 12 Ugandan soldiers who served as peacekeepers.

Al-Shabab, which often exaggerates the success of its attacks, claimed it had killed 70 people in the assault, which came roughly a year after al-Shabab leader Ahmed Abdi Godane was killed in a U.S. airstrike.

The al Qaeda-affiliated Islamists were pushed out of Mogadishu by AU peacekeeping forces in 2011.

(Reporting by Abdi Sheikh and Feisal Omar; Writing by Edith Honan; Editing by Ros Russell)