Nearly 900 children held by a pro-government militia force fighting Boko Haram insurgents in northeastern Nigeria were freed on Friday, the UN said.
The 894 children, including 106 girls, had been in the ranks of the government-backed Civilian Joint Task Force (CJTF), a local militia which supports regular soldiers battling the extremists.
At a ceremony in the north-eastern town of Maiduguri, they were released as part of the CJTF's "commitment to end and prevent the recruitment and use of children," the UN children's agency (Unicef) said.
"Children of north-east Nigeria have borne the brunt of this conflict," said Mohamed Fall, the Unicef chief in Nigeria.
"They have been used by armed groups in combatant and non-combatant roles and witnessed death, killing and violence."
The CJTF militia formed in 2013 to protect communities from attack, but it has also recruited hundreds of children.
In 2017, the militia signed a promise to stop recruiting child soldiers and release the ones they hold.
The children freed on Friday bring the total released since then to 1,727 children, Unicef said.
It was not clear how many children remain in its ranks, but the UN welcomed the news on Friday.
"Any commitment for children that is matched with action is a step in the right direction for the protection of children's rights, and must be recognised and encouraged," Mr Fall said.
The freed children will be enrolled into a reintegration programme with education and training to help them return to civilian life.
Boko Haram's uprising to establish a hardline Islamic state in Nigeria's north-east has spilled into neighbouring Niger, Chad and Cameroon.
The extremists have also recruited thousands of children to fight in their ranks.
"We will continue until there is no child left in the ranks of all armed groups in Nigeria," Mr Fall said, noting that children "have been abducted, maimed, raped and killed".