Human Rights Watch has accused Somali government authorities of abusing children who are allegedly associated with militant group al-Shabab.
In a report released Wednesday, the rights group said boys are illegally detained and sometimes prosecuted in military courts.
Somalia's federal government has vowed to transfer the children to the United Nations International Children's Emergency Fund for rehabilitation. However, the report found there has been no consistent response from national and regional authorities who have, at times, violated international human rights law.
The government captured 36 children from al-Shabab on January 18, after a week of negotiations with U.N. and child advocates to develop a plan to help them. But the talks have had only limited success, said Laetitia Bader, the rights group's senior Africa researcher and the report's author.
"The government's haphazard and, at times, outright abusive approach harms children and compounds fear and mistrust of security forces," Bader said.
The report is based on interviews with 80 children who were once associated with the militant group, as well as boys who were previously detained, attorneys, child advocates and government officials. Findings were also based on research into military court proceedings and visits to two prisons.
The U.N. has said that since 2015, Somali authorities have apprehended hundreds of boys with suspected ties to al-Shabab. The al-Qaida-linked group has battled to install a strict Islamic state in Somalia since 2006.
International law requires Somalia to recognize anyone under age 18 who has been recruited or used in armed conflict, including terrorist activities, and help with their rehabilitation.
The report said child members of armed groups can be tried for serious crimes but court proceedings should comply with juvenile justice standards. Non-judicial solutions should be considered.
The criminal prosecution of children in Somalia is uncommon, the report said, but authorities use an antiquated legal system to try children linked to al-Shabab in military courts, usually as adults.