A Rwandan high court on Friday sentenced 13 people to five years and two others to ten years in jail after convicting them of belonging to extremist groups including al Shabaab and Islamic State and providing them support.
The court in Rwanda's southern Nyanza area acquitted 25 others after the prosecution failed to prove their involvement in extremist acts.
Police in the central African country arrested the 40 in January 2016, less than a week after they killed Muhammad Mugemangango, a preacher accused of encouraging youths to join extremist groups. Security personnel also seized jihadist materials such as books, CDs and social network messages.
One of those convicted, Salim Fundi, participated in "coordinating people in Rwanda who wanted to join terrorist group of al Shabaab in Somalia," said Judge Eugene Ndagijimana while delivering the ruling.
Those convicted included three women, two of them arrested at the airport in Kigali while en route to Syria and another convicted of helping them with $1,000 for flight tickets.
Most Rwandans are Christians, Muslims account for about 2.5 percent of population.
After Mugemangango's death, the country's main Muslim association, Rwanda Muslims, said it planned to circulate messages condemning radicalisation to all of Rwanda's mosques.
"This case reminds that we should tell our youth to be cautious... (of) those who lure them after promising them that they will give them better things," said Rwanda's Muslim community mufti, Sheikh Salim Hitimana.
Al Shabaab is fighting to topple Somalia's central government and establish its own rule based on its strict interpretation if Islamic law, while Islamic State once aspired to establish a caliphate in Syria and Iraq.