Farah Abdi Warsameh, Associated Press
A female police officer inspects the scene of a car bomb attack outside a restaurant in the capital Mogadishu, Somalia Saturday, April 9, 2016. A Somali police official says two people have been killed in a car bombing at a restaurant where dozens of people were dining, in the capital Saturday.

MOGADISHU, Somalia — A car bomb exploded on Monday outside restaurant packed with lunchtime customers in the Somali capital of Mogadishu killing at least five people, said witnesses.

The restaurant in the capital's Hamarweyne district is close to the municipal government headquarters and in busy commercial area.

Mohammed Mahdi said he saw at least five people covered in blood outside the headquarters, while shopkeeper Yusuf Ali said the car bomb exploded while the area was filled with shoppers.

Al-Shabab, which has ties with al-Qaida, has been carrying out a campaign of deadly violence targeting government officials and international troops, as well as hotels and restaurants in the capital.

Neighboring Kenya, which has sent troops to fight the Islamic extremists in Somalia, has also been repeatedly attacked by al-Shabab.

The attack came as the Somali government announced the execution of a former journalist linked to al-Shabab for the murder of five journalists.

Journalists are also frequently targeted in Somalia and it is one of the most dangerous countries for media workers. At least 18 journalists were killed last year, according to the Committee to Protect Journalists.

It's not entirely clear who has been killing journalists. Al-Shabab rebels, warlords, criminals, and even government agents all could have reasons to see journalists killed in Somalia.

Hassan Hanafi Haji was executed by firing squad at the Mogadishu police academy after being extradited from Kenya.

Haji was a liaison officer with al-Shabab and known for threatening journalists for not reporting in favor of the extremist group. Haji later led al-Shabab's media unit, inviting journalists to press conferences and giving them tours of battlefields.

Haji was one of the few prosecuted by the government following years of criticism by rights groups who urged authorities to do more to establish the rule of law and end the killings of journalists.