African Union peacekeepers and the Somali army launched a campaign last year that has forced al Qaeda-linked al Shabaab rebels out of major strongholds in central and southern regions, but they still control many rural areas.
Analysts say the group might have shifted extra fighters to Puntland, a semi-autonomous northern region that was relatively calm till recently, and in the last two weeks, Puntland troops have fought rebels in the area over several days.
"Gunmen attacked us last night with grenades and gunfire. Two policemen died and three others were injured," said Mohamuud Saciid, a Puntland police captain told Reuters, referring to Wednesday's late night assault which he blamed on al Shabaab.
Al Shabaab's military operations spokesman, Abdiasis Abu Musab, confirmed the group was behind the attack in Basasso port town, although he said three officers had been killed. Al Shabaab often gives a higher death toll than officials.
Residents worry that the attack, coming so soon after the fighting in the Galgala hill region, where Puntland security forces said they killed 20 militants, heralds the start of a new militant offensive in the area.
"It seems al Shabaab is increasing in number these days after the Galgala hills war. Some al Shabaab fighters have come into the towns," Basasso resident Ahmed Nur said. He had heard of other attacks on police posts, he said.
"We also see many forces deployed into the town. We cannot say al Shabaab is as strong as it is in Mogadishu. However, the mood is changing here," he said.
Despite the joint military campaign further south, al Shabaab has continued to strike with often devastating effect using hit-and-run bomb and gun attacks in the capital Mogadishu and in towns.
The group, which wants to impose its strict interpretation of Islam on the nation, ruled southern and central Somalia for several years until the African Union forces drove them out of Mogadishu in 2011.