The al-Shabaab group on Monday gunned down three government officials and their driver in central Mogadishu, police said.
Police officer Mohamed Dahir said the immigration officials were being driven home from work.
He said “gunmen in another vehicle fired at the victims, adding that the police were searching for the attackers.
Al-Shabaab Spokesman, Sheikh Mus’ab, told newsmen that the group had carried out the attack and would continue to target government employees.
On Sunday, two suspected al-Shabaab members shot a civil servant in Mogadishu and escaped.
Somalia’s decade-long conflict with al-Shabaab, which wanted to establish an Islamist state, cost thousands of lives.