Al-Shabaab attacked a Kenya Defence Forces base in Kismayu on Tuesday night.
However, the shooting was done aimlessly and did not cause any casualties among the forces working under the African Mission in Somalia (Amisom).
Lieutenant Colonel Chala Hassan, who is heading the forces in Kismayu, said the shots were aimed at provoking response from Kenyan forces.
KDF responded with heavy artillery, bombing the area where the gunshots originated from, and it was not immediately clear whether the militants were killed.
“What the Al-Shabaab did was what in military terms we call a probing attack done by two or three people to try and find location of the enemy. It was not decisive where sophisticated weapons are used with an aim of inflicting casualties,” a military source, who sought anonymity, said.
Lt Col Hassan said the attackers did not hit their target. “They have been launching such attacks once in a while,” he said.
The attack comes after last week’s major assault by KDF on Al-Shabaab base in Garbaharey in Gedo where more than 50 of the Al-Qaeda linked militants were killed.