Mogadishu (AFP) - Two men convicted of murdering a journalist and a security official were executed in public in Somalia's capital Mogadishu on Sunday, officials said.

The men, Ali Bashir Osman, 22, and Abdulahi Sharif Osman, 25, were arrested in southern Mogadishu during a raid by security forces.

"The two men were behind the killing of journalist Mohamed Mohamud who worked with Universal TV and a security official. The court found them guilty in August and today they were executed publicly," national prosecutor Abdulahi Hussein Mohamed reporters.

Witnesses said the victims were tied to posts and publicly executed by firing squad at Mogadishu's police academy.