Somalia's newly elected President Mohamed Abdullahi Farmaajo attends his inauguration ceremony in Somalia's capital Mogadishu, February 22, 2017. REUTERS/Feisal Omar

MOGADISHU (Reuters) - Somalia’s president said late Thursday night the country’s army was in “hot pursuit” of Islamist group al Shabaab fighters after the insurgents’ assault on a military base in the Puntland region that left at least 38 people dead.

In the early Thursday attack, the Islamists overran a military base in Af Urur, a town about 100 km (60 miles) south of Bosaso, the capital of Puntland, one of Somalia’s semi-autonomous regions.

Most of those killed were soldiers, a Puntland security official said, adding 18 others were wounded, with an unknown number also feared captured alive.

In a statement, President Mohamed Abdullahi Farmaajo promised the Somali military would retaliate and avenge al Shabaab’s attack.

“We must show no mercy in dealing with Alshabab,” he said.

“We promise that Alshabab won’t get away with this. As of now, our troops are in hot pursuit of the enemy, they will pay for today’s attack.”

The al Qaeda-linked Islamist group cited a higher toll in the attack, saying it had killed 61 soldiers. Numbers given by officials and al Shabaab often differ.

Al Shabaab is fighting to topple Somalia’s central government and rule the country according to a strict version Islam’s sharia law. They also want to drive out the African Union peace keeping force AMISOM which is helping to defend the central government.

The group rarely carries out attacks in Puntland, where the security forces are relatively regularly paid and receive substantial U.S. assistance.