Hassan Hanafi
Hassan Hanafi, a former media officer for the Somali Islamist group al Shabaab, sits inside the dock at the courthouse in the capital Mogadishu, March 3, 2016. REUTERS/Feisal Omar

A former journalist and media officer for the Somali Islamist group al-Shabaab has been sentenced to death for the murder of six journalists. After being handed his sentence at a Somali military court on 3 March Hassan Hanafi said that he had "only killed one" local journalist whilst working with the terrorists.

Hanafi, helped the Islamist militant group by identifying possible targets amongst journalists between 2007 and 2011 who had portrayed the al-Qaeda-affiliated militants in a bad light. He was once a household name in the country before joining Radio Andalus, al-Shabaab's mouthpiece in Somalia.

Eventually the Islamic fundamentalists were pushed out of Mogadishu by African Union peacekeeping forces in 2011 but they have continued to plague Somalia, launching frequent attacks in attempt to disable the western-backed government.

Chairman of the Somali military court in Mogadishu, Hasan Ali, said Hanafi had admitted to killing one reporter and had been found guilty of killing five others. "He will be put to death as soon as possible," Ali said according to the Reuters.

The 30-year-old was arrested in neighbouring Kenya in 2015 and then returned to Somalia for trial. "Al Shabaab killed many journalists but personally I killed only one," Hanafi said after the sentence. "But I am indifferent if you kill me. You will see if killings will stop even after my death."

Born in the central Hiran region Hanafi was promoted to commander in 2009. Ali said the evidence suggested Hanafi: "had key roles in the masterminding and execution of the murder of several journalists," reported the AFP.

Many reporters were forced to flee Somalia after receiving threats from Hanafi. And according to the Committee to Protect Journalists (CPJ) more than 25 journalists have been murdered in Somalia since 2007.

A year after his promotion a prominent radio journalist, Sheikh Noor Mohamed, was murdered. Hanafi admitted planning the killing because he believed that Mohamed was working for the government.

At one stage he did upset his al-Shabaab masters because in 2011 a sharia court found Hanafi guilty of an unnamed crime, and ordered his limbs to be amputated. He was spared the punishment because of his service to the insurgents.

Al-Shabaab, which means "The Youth", is an off-shoot of the Islamic Courts Union – a rival administration to the Transitional Federal Government in Somalia. They aim to overthrow the Western-backed Somali government and impose its own version of Islam in the country.

Over 20 people were killed by the Islamist militants when they attacked a popular beachfront restaurant in Mogadishu in January . The Beach View Cafe on Mogadishu's popular Lido beach was targeted by the extremists who let off at least two car bombs.