The attack in Buulo Burde in the south of the country on Tuesday targeted a hotel crowded with army officers and was followed by an assault by Shebab gunmen, leaving several dead, officials said.
"The attacker of Buulo Burde was a 60-year-old man who came from Norway to fight the enemies of Allah," Shebab military spokesman Sheikh Abdul Aziz Abu Musab told AFP, naming the attacker as Abdullahi Ahmed Abdulle, a Norwegian national of Somali origin.
"He paid the sacrifice in order to be close to Allah by killing his enemies. The event is showing us that there is no age limit for jihad," the spokesman said.
The attack is the latest by the Shebab, launched in apparent retaliation for a new offensive to root them out of areas of the war-torn country still
under their control.
African Union soldiers, who are fighting the Shebab alongside Somali government troops, captured the small town from the Islamists last week.
Story continues below…
The UN-backed AU force this month launched a fresh offensive against Shebab bases, with the gunmen largely fleeing ahead of the assault, only to later stage guerrilla attacks. Shebab fighters once controlled most of southern and central Somalia but withdrew from fixed positions in Mogadishu two years ago.
Recent Shebab attacks have targeted key areas of government or the security forces, in an apparent bid to discredit claims by the authorities that they are winning the war.