A prominent Somali journalist who was a critic of the Islamist militant group al-Shabab has been killed in a suicide bomb attack in the capital, Mogadishu.

Abdiaziz Mohamud Guled, also known as Abdiaziz Afrika, was targeted as he was leaving a restaurant in the city shortly after midday.

Two other people nearby were injured in the blast and taken to hospital.

Al-Shabab said it was behind the attack and had targeted the journalist, who worked for Radio Mogadishu.

The bomber detonated a device in front of a car near the restaurant where Guled was accompanied by the director of Somali National Television and a driver, according to a report published on the official Radio Mogadishu website, citing police sources.

The report included a statement from Somali Prime Minister Mohamed Hussein Roble, who offered his condolences to Guled’s family.

“Abdiaziz was a hardworking journalist and national hero who worked for his country, his people and his religion with courage and relentlessness,” he said.

Guled was well known for his interviews with detained al-Shabab suspects and his broadcasts often attracted large audiences.

Al-Shabab, which means The Youth in Arabic, is an extreme Islamist group which has been battling UN-backed government troops for more than a decade.

The jihadists controlled the capital Mogadishu until 2011 when it was pushed out by African Union troops, but it still holds territory in the countryside and launches frequent attacks against government and civilian targets in Mogadishu and elsewhere.

It advocates the strict Saudi-inspired Wahhabi version of Islam, while most Somalis are Sufis. It has imposed a harsh version of Sharia in areas under its control, including stoning to death women accused of adultery and amputating the hands of thieves.

Government officials have blamed the group for some of Somalia’s deadliest terror attacks. Last year analysts at the Armed Conflict Location and Event Data Project estimated that Al-Shabab had been responsible for the deaths of over 4,000 people since 2010.