al shabaab somalia
Al-Shabaab militants often carry out attacks against Somalian and Kenyan troops Reuters

Militants from al-Shabaab killed at least seven Somali soldiers when they attacked a military base in the town of Baidoa on Friday morning.

The surprise attack comes just days after the US killed the group's head of intelligence in a drone strike in a major setback for the group.

"Al-Shabaab attacked our base unexpectedly early in the morning today. We lost seven soldiers," said Ahmed Idow, a Somali military officer, as quoted by Reuters news agency.

Three al-Shabaab fighters were killed in the morning attack, according to Idow.

The group said it seized the base temporarily, killing 10 soldiers in the process.

"We fiercely attacked the military base near Baidoa," Sheikh Abdiasis Abu Musab, al-Shabaab's military operation spokesman, told Reuters.

The al-Qaeda affiliate has suffered a series of major losses, as the US and African Union have stepped up military operations against the group.

Tahlil Abdishakur, chief of al-Shabaab's intelligence and security wing, died on Monday after the US bombed his vehicle. The US said his death "will significantly impact al-Shabaab's ability to conduct attacks against the government of the Federal Republic of Somalia, the Somali people, and US allies and interests in the region."

A senior member of the group was reportedly captured by the Somali army in a raid close to the Kenyan border.