Al-Shabaab militants captured a town in Somalia's semi-autonomous Puntland region on Thursday, a senior official said, and the group said it had killed at least 61 soldiers in the fighting.
"Now we confirm 38 people, mostly soldiers, died and 18 others were wounded".
Another officer speaking to Reuters put the death toll at 20, adding that Puntland forces managed to retake the town after intense fighting.
"Numerous, heavily armed al Shabaab fighters attacked us from every direction and after hours of fierce battle I was among those who ran for their lives".
"Al Shabaab fighters killed local residents of the town including elders, women and children".
The al-Qaeda-linked group has carried out several big attacks on military bases in Somalia. There were few soldiers there and thus al-Shabab captured the town.
In a statement, the Shabaab said it had launched the raid killing scores of soldiers and stealing vehicles and weapons.
"Al Shabaab will regret killing civilians". The numbers given by officials and al Shabab often differ.
The Takfiri militant group was forced out of the capital by African Union troops in 2011 but still controls parts of the countryside and carries out attacks against government, military and civilian targets seemingly at will in Mogadishu and regional towns.
The Galgala Mountains are a stronghold of al-Shabab, but a faction of militants broke away in 2015 to affiliate themselves with the Islamic State group.
"The number could rise since the operation is still underway", Abdiasis Abu Musab, al Shabaab's military spokesman said. Security sources say a small contingent of foreigners is there as well.