A Senegalese court issued a suspended prison term on Wednesday to a Koranic school teacher who chained up truants, in a much-publicised case that has split opinion in the west African country.
Six people were arrested last month after several children were discovered, by chance, with chains around their feet in a Koranic school in the northern town of Ndiagne.
The resulting court case against the teacher has inflamed passions in the poor nation of some 16 million inhabitants.
At least 90% of the population is Muslim and entrusting children to the country's many thousands of Koranic schools - run by teachers known as "marabouts" - is traditional.
But some of the unregulated schools have been accused of abuses.
In June NGO Human Rights Watch warned of "alarming rates" of abuses, such as rape, forced begging and imprisonment, in some of the Koranic schools.
A court in Louga, in Senegal's northeast, delivered its verdict on the case of the chained children on Wednesday amid tension as police blocked roads and supporters of the teacher, Cheikhouna Gueye, gathered behind barriers.
The same supporters sacked the courthouse last week, protesting the detention of four of the children's parents, as well as the blacksmith who made the chains.
Gueye received a two-year suspended prison term on Wednesday after being arrested for his role in chaining his students. Prosecutors had originally pushed for jail time.
On Wednesday the court also issued a two-year suspended sentence to the parents and the blacksmith.
'A good Muslim'
Supporters of the teacher, who recited religious poetry and chanted hymns outside the courthouse during the proceedings, welcomed the suspended terms.
His brother, Mor Gueye, also said he was "very happy" with the verdict.
"Cheikhouna is a good Muslim," he said. "He works only for the Koran".
His nephew, Mansour Sur, also said he was pleased his uncle would not be imprisoned but added it was time to reform the some of the traditional Koranic-school practices.
All of the defendants told the court last week that it was the parents themselves who had asked for their children to be chained up, because they had been playing truant.
The defendants also said they did not know it was illegal to chain children.
Photos of the chained Koranic students in Senegal were shared widely on social media and provoked uproar.
But the teacher's supporters defended the chaining and insisted the children were well treated, while local media covering the case described the Koranic school in Ndiagne as well maintained.
Senegal is not the only African country to witness such scandals.
Nigeria this year has seen a series of horrific revelations of torture, abuse and sexual assault at Koranic reform schools in its mostly Muslim northern region.
The schools provide poor families with education help for relatives considered delinquent or drug addicts. But they are often unregulated by authorities, critics say, leaving students vulnerable to abuse.