Civilian militia helping the Nigerian military against Boko Haram have promised to stop using children as part of their security operations, the United Nations said on Friday.
The Civilian Joint Task Force (CJTF) agreed to the measure as part of a new action plan signed in the northeastern Borno state capital, Maiduguri, Unicef said in a statement.
The UN's annual report on children and armed conflict, published in May, found that 228 children, some of them as young as nine, were working for the CJTF.
The youngsters were assisting with intelligence searches, night patrols, crowd control and at checkpoints.
Unicef said an action plan developed since then involves the CJTF promising not to recruit and use children, and to release any minor currently performing duties.
"We have seen too many childhoods destroyed by the crisis in the northeast," said Unicef's representative in Nigeria Mohamed Fall.
"Today's agreement is an important milestone for child protection and paves the way for a brighter future for children caught up in the conflict."
Boko Haram's Islamist insurgency has left at least 20,000 people dead and displaced more than 2.6 million others since it began in 2009.
Children have been particularly affected, with abductions and forced recruitment widespread, as well as attacks on schools teaching the so-called "Western education" the group despises.
The UN report said at least 3,900 children were killed and 7,300 others injured as the humanitarian situation worsened in northeast Nigeria between January 2013 and December 2016.
Boko Haram, which has been pushed out of captured territory by a sustained military counter-offensive since early 2015, has increasingly used children as suicide bombers.
Unicef said in August that 83 children had been used as human bombs in northeast Nigeria since the start of the year -- four times as many as in 2016.
Fifty-five were girls, most of them aged under 15. Twenty-seven were boys and one was a baby strapped to a girl.
Since 2014, a total of 125 children have been used as bombers.