The 25 boys and girls allegedly cooperated with the Islamist terror group Boko Haram. Human and children's rights activists are concerned at how minors are being treated by both militants and Nigeria's army.
The Nigerian army has released 25 children previously detained on suspicion of having cooperated with the Muslim militant group Boko Haram.
The 23 boys and two girls, who had been held in the Giwa barracks in the northeastern state of Borno, were released on Thursday, a spokesperson from UNICEF said.
The youngest child was 9 years old, the spokesperson said.
Human Rights Watch (HRW) heralded the children's release in a statement as "an important step toward rights-respecting treatment of children affected by the Boko Haram conflict."
The organization had accused Nigeria in September of abusing children's rights by holding them in inhumane conditions on suspicion of collaborating with Boko Haram. The report detailed overcrowded cells, beatings and hunger. It also said the children were held without official charges.
HRW's children's rights advocacy director, Jo Becker, praised the Nigerian government for showing readiness to uphold human rights standards.
"These children can now return to their families and continue their education, instead of rotting away in prison," Becker said in the statement.
Read more: Opinion: Boko Haram — no end in sight
Children targeted by Boko Haram
According to HRW, since 2013 the Nigerian army has detained over 3,600 children alleged to have links to Boko Haram. Over the same time period, some 2,200 children have been released, the United Nations reported.
Thursday's release brings the total number of freed children in 2019 to 44.
Boko Haram's militant insurgency and the Nigerian armed forces attempt to contain it have displaced 2 million Nigerians
The state of Borno, bordering Chad, Cameroon and Niger, is the mainstay location of Boko Haram. Over the past 10 years, it has been fighting and launching attacks to try and set up a radical Islamist government, with the Nigerian army fighting back. Some 30,000 people have been killed in the conflict, with 2 million more displaced.
Read more: 10 years of radicalization: Boko Haram
Boko Haram has recruited children for its insurgency, as well as abducting women and children as captives for its fighters. Regional militias aligned with government forces have also used children in their fight. The total number of affected children is unknown.
cmb/msh (EFE, KNA, Reuters)