A car bomb blasted open the gate of the police station in the central Somali town of Beledweyne Tuesday, with gunmen then storming the building shooting and killing, officers and witnesses said.
Bodies were reported to be strewn around the blast site, but it was not immediately possible to say how many had been killed.
"The explosion was enormous and there are casualties... but the situation is now under control," said Colonel Abdulkadir Ali, a senior police commander in the town, which in recent months has been hit by a series of bombs and shootings claimed by Al-Qaeda-linked Shebab insurgents.
Witnesses said the car rammed the gate of the station before bursting into a huge ball of flames.
"The car hit the gate of the police station and exploded, then after the explosion men with machine guns stormed the building, there was lots of shooting," said Hassan Nur, who saw the attack.
"I can't say how many are dead, but I saw several bodies lying around the area where the car blew up."
No one immediately claimed responsibility for the attack.
Last month a suicide bomber killed at least 15 people in an attack on a popular restaurant in the town, which lies close to the border with Ethiopia, and which is under the control of pro-government Somali forces.
The Shebab said they carried out the restaurant bombing, saying they were targeting Ethiopian troops and soldiers from the African Union mission who are also stationed in the town.
Beledweyne, which lies some 300 kilometres (185 miles) north of Mogadishu, holds a strategic position commanding the road to the capital.
The Shebab have been driven out of fixed positions in Somalia's major towns, including Mogadishu and the southern port of Kismayo, by a UN-mandated African Union force of more than 17,000 men.
However the group still controls large swathes of southern Somalia and continues to launch brazen attacks including suicide bombings and commando attacks.