Zaria, Nigeria (CNN) -- A forlorn murmur of young voices echoes from a shack pieced together from rusted corrugated iron.
Inside, more than 50 children with torn clothes and unwashed faces hunch over small wooden tablets or torn scraps of paper with sections of the Quran.
Above them stands a 20-year-old with a small whip -- the children are here to memorize the Quran.
They are the Almajiri.
On the walls hang small bags with their few belongings. In these dark, cramped conditions, the children must study, sleep and eat.
It's an ancient tradition. Poor families from rural areas across West Africa send their children to a network of Islamic boarding schools in the cities of northern Nigeria.
Once here, often hundreds of kilometers from their families, they receive little education and no money.
The Almajiri must beg to survive. Across the north, an afternoon break in classes sends the children flooding into the streets with small bowls to search for any scraps.
Over the past few decades, the system has been overwhelmed and neglected.
One young man sent by his family from neighboring Niger told CNN how the schools use him and other children as foot soldiers in religious clashes.
Fearing for his life, he spoke on condition of anonymity, telling how he lost his arm in 2000 in religious violence that killed about 1,000 people in the northern city of Kaduna.
"I blame my Quranic teacher, who sent me to fight during the riots," he said.
"He has ruined my life."
In 2000, about 1,000 people died in religious violence, and hundreds more two years later, after the Miss World competition was to be held in Kaduna. Many of the perpetrators came from the Almajiri.
The Nigeria-based Almajiri Education Foundation says on its Web site: " 'Almajiri' is a word borrowed from Arabic for someone who leaves his home in search of knowledge in Islamic religion. In the ideal situation, the communities should support these children as they leave their families to become a servant of Allah.
"Unfortunately this has not been the case," the foundation's site continues, "and many young boys are leaving their homes only to end up in the streets begging. They have no one to turn to."
Though there are no exact figures on the Almajiri, they are estimated to number in the millions.
The only census ever taken was in Kano state, which found in 2006 that there were 1.2 million Almajiri in Kano alone. One researcher working with UNICEF estimates that 60 percent of the children never return home.
"We can see the manifestations in child begging, child destitution, child trafficking," said Muhamed Laden, a professor of law at Ahmadu Bello University.
"And then they're easily instigated for them to be involved as children in such conflicts that have largely been violent and very bloody in this part of the world."
The government is looking into monitoring and licensing the schools, but the National Council for the Welfare of the Destitute, which is piloting such a program, complains of too little funding.
Council officials warn that the consequences of ignoring the children could be dire.
"They're a real threat -- a real problem -- to the society, unless you address this issue now," said Usman Jibrin, the council's president.
"Otherwise, these children will one day take over control of this country -- in a very unpleasant way."
The children are a violent threat to Nigeria, but also its first victims.