Three people were shot and killed in Mogadishu Waberi district on Wednesday night.
According eyewitness gunmen killed the three men separately and escaped the scene.
Police arrived at the sight later for investigations.
Armed group al-Shabaab later claimed the responsibility of the attack.
The group said the three were officials from Somali National Intelligence and Security Agency ( NISA).
Al-Shabaab targets Somali government officials and their international organization partners.
The group has lost key strategic areas mainly in the Lower and Middle Shabelle regions following offensive by Somali National Army backed by AMISOM troops in recent past months.
The troops recaptured Aw-dhegle, Barire, Sabid and Canole which was previously controlled by the group for years.
Recently appointed youthful Somali National Army chief, General Odowa Rage vowed an offensive against the group to retake areas still under their control.