Somali forces attacked the Al-Shabaab court following clashes in the Lower Shabelle region on Monday.
The police and Intelligence elite forces have jointly raided Basra village near Mogadishu and killed a number of Al-Shabaab members.
The allied Somali forces reportedly rescued people held at Al-Shabaab prison, according to the state media. Several fighters were nabbed and weapons were recovered.
The operation comes days after Al-Shabaab killed 21 people in Hiran after an attack on a convoy between Beledweyne and Mahas towns in the Hiran region.