In Kenya, militant groups such as al-Shabab and the Islamic State continue to lure young Muslims. To fight back, a local organization has launched a de-radicalization program to train imams and work with the affected youth.
The program, called BRAVE - short for Building Resilience Against Violent Extremism, has reportedly already reached 2,000 young people.
For those trying to counter the message of radicals, such as clerics and imams or youth not affiliated with a terror group, the program offers four-day training "modules."
For radicalized youth, those who have joined a militant group like al-Shabab, the program takes anywhere from six months to three years.
In 2013, a U.N report linked one of the officials at Riyadha Mosque in Pumwani to terrorist funding.
Imam Aizadin Omar has been at his mosque for five years and the BRAVE program trained him how to detect and counter extremist leanings in his community.
"Before these youth accept to be de-radicalized, it takes time and you have to go step by step. Then there are those who are deeply radicalized and changing them back is quite hard but by Allah's grace we manage eventually," Omar said.
Abdul Mwangi was among young men who attended sermons in other mosques where radical preachers called on people to devote their lives to jihad. He said he shied away from that line of thought after going through the BRAVE program.
“What I can say for myself and [the] other youth [is] even if you tell me something [the] Quran says, yes I will accept, but I will not do anything [in terms of] implementation before I go back to the Quran and confirm [what is being preached] for myself,” Mwangi said.
BRAVE has trained about 150 clerics and imams like Omar. But the founder of the program, Mustafa Ali, says some are still staying away, fearing reprisals.
"Many Kenyans, particularly the Muslims, have been intimidated by the violent extremist groups to such an extent that they do not want to talk about violent extremism. They do not want to talk about intimidation," Ali said.
De-radicalization programs are not new. Saudi Arabia has run one since 2004. Both Nigeria and Mauritania have them. But there is a lot of debate as to whether they actually work. Experts, like security analyst Andrew Franklin, say root causes like unemployment must also be addressed.
"De-radicalization programs are dealing with symptoms rather than causes of the problem. The real question is simply what causes the people, youth particularly, to move from being alienated, marginalized and the like, [to] picking up weapons - in other words being radicalized - to going off and to fight, to join terrorist groups or subversive groups, insurgent groups?" Franklin asked.
As prisons across Africa fill up with terror suspects, observers believe that is a question the continent cannot afford to dismiss.