Hassan Hanafi, a former media officer for the Somali Islamist group al Shabaab, was tied up at a police academy square in the capital Mogadishu today before being shot.
"A vehicle bomb exploded on Monday outside a restaurant packed with lunchtime customers in the Somali capital of Mogadishu killing at least five people", said witnesses.
Firing squad is the only execution method used in Somalia.
Ms. Mohamed was reportedly the 38th journalist to be killed in Somalia since 2010.
Al-Shabaab rebels have carried out repeated attacks in Somalia and neighboring Kenya as part of their fight to overthrow the internationally-backed Somali Federal Government, as well as the African Union troops supporting it, which include Kenyan soldiers. He allegedly helped the group identify possible targets, and would often call journalists and threaten to kill them if they didn't join al-Shabaab.
Al-Shabaab, an al-Qaeda-linked militant group, has waged an insurgency in Somalia since 2006 in a bid to impose a strict version of Islamic law.
The two were found guilty of assassinating national television journalist Hindiyo Haji Mohamed, who was killed last December at the hands of a auto bomb as she travelled home from a university class.
Haji later led al-Shabaab's's media unit, inviting journalists to press conferences and giving them tours of battlefields.
Somalia has been the scene of deadly clashes between government forces and al-Shabab militants since 2006.
Farah Abdi Warsameh/AP Hassan Hanafi Haji was sentenced to death for his involvement in the killings of at least five Somali journalists.