The comp was open to kids as young as 10 and also had hand grenades amongst the prizes.
The children had to recite pages from the Koran and answer general knowledge questions in the contest.
Andulus radio, which is based near Mogadishu, gave the group of youngsters who won the first prize in the Ramadan competition an AK-47 rifle and the equivalent of $700 (£450).
The second prize-winners received an AK-47 and $500, while the third prize was two hand grenades and $400.
The competition was run by the terror group al-Shabab, which has reported links to al-Qaeda.
An official from al-Shabab said at the prize-giving ceremony: "Youths should use one hand for education and the other for a gun to defend Islam."
The winning children were also awarded religious books.