Three fighters and one soldier were killed on Sunday morning attempted attack on Somali Intelligence training centre in the capital Mogadishu.
According to security officials fighters used suicide car bomb before entering nearby civilian building and engaged heavy fire fight with security forces.
Three fighters were killed and one soldier succumbed to injuries sustained from suicide car bomb.
Al Shabaab operation spokesman Sheikh Abdulaziz Abu Musab has said the group was behind the attack.
This is the second major attack since the group announced to intensify attacks during the holy month of Ramadan against what it terms as apostate and western backed government of Somalia.
On Friday another Al-Shabaab attack has killed at least eight Somali police officers in a raid on a police station in Afgoye near the capital Mogadishu.