The BBC reports that Andulus radio, based near Mogadishu, chose four children between the ages of 10 and 17 from each district in the competition, which was held during the Muslim holy month of Ramadan, which ended in August.
The second place winners received an AK-47 and $500. The third prize group got two hand grenades and $400.
"Youths should use one hand for education and the other for a gun to defend Islam," senior al-Shabab official Mukhtar Robow said at a prize-giving ceremony.
The winners also got religious books.
According to the BBC, this is the third year that al-Shabab has held the competition.
According to the New York Times, this year's contest featured questions like "which war was Sheik Timajilic (a famous Shabab warrior) killed in?"
Without a functioning central government, Somalia has some of the lowest schooling rates in the world, and many Somali children are more familiar with rifles than rulers. Contestants in the Shabab quiz included children from all across Shabab-controlled areas of Somalia, most of the southern third of the country. The children competed live on air from the many radio stations nationwide that the Shabab control.
Over the summer, al-Shabab banned foreign aid in Somalia, despite facing the Horn of Africa's worst drought in decades and a spreading famine. In August, the group pulled out of the capital, Mogadishu. In early September, the U.N. said that hundreds of people were dying every day in the county, and that 4 million people were in need of emergency food aid.