At least 13 people have been killed and another 10 wounded in a suicide bomb attack in Somalia.

The al-Shabaab group claimed responsibility for the explosion, which happened at a restaurant near a military base in the city of Beledweyne, around 210 miles north of Mogadishu. The city is under the control of the central government and African Union peacekeepers from Djibouti are stationed there.

"Our main target was Ethiopian and Djibouti troops who invaded our country. They were sitting there," al-Shabaab's military operation spokesman, Sheikh Abdiasis Abu Musab, said.

He put the death toll from the attack at 25.

"A man with an explosives jacket entered unexpectedly in the tea shop where soldiers and civilians sat … and blew himself up," local elder Ahmed Nur said from the scene of the blast.

"I could see the bodies of several soldiers being carried, but I could not make out whether they were dead or injured." Al-Shabaab frequently attacks political targets as well as restaurants and other recreational spaces popular with foreigners and government soldiers.

The al-Qaida linked militants also claimed responsibility for an attack last month on a shopping centre in Nairobi in which at least 72 people were killed.

Ethiopian troops have been fighting Islamist militants in neighbouring Somalia for much of the past decade.

The country waged an ill-fated war between 2006 and 2009, and sent troops across the border again in 2011 to combat al-Shabaab militants, who were also battling Kenyan troops and an African Union military mission.