Yemen’s Huthi rebels have agreed to stop using child soldiers, the United Nations said, after thousands of under-age fighters were recruited for the seven-year civil war.

The Huthis will release all child soldiers within six months under a new action plan, the UN said, adding that the warring parties have all now committed to ending “grave violations” against children.

There was no immediate comment from the Huthis about the agreement, which was signed after a fragile, UN-brokered truce started on April 2.

Nearly 3,500 child soldiers have been identified and more than 10,200 children have been “killed or maimed” since the war started, the UN said.

A Saudi-led coalition intervened in 2015 to prop up the internationally recognised Yemeni government after the Iran-backed Huthis seized the capital Sanaa the year before.

“The Huthis have signed an action plan with the United Nations to end and prevent the recruitment and use of children in armed conflict, the killing and maiming of children, and attacks on schools and hospitals as well as other grave violations,” a UN statement said on Monday.

In the latest evidence of child deaths, three children were among at least 80 people, apparently civilians, killed in coalition air strikes in late January, Human Rights Watch said on Monday.

More than 2,500 schools in Yemen are unfit for use, with some destroyed and others turned into refugee camps or military facilities, according to the UN children’s agency.

“The most difficult part of the journey starts now,” Virginia Gamba, the UN secretary-general’s special representative for children and armed conflict, said in the statement.

“The action plan must be fully implemented and lead to tangible actions for the improvement of the protection of children in Yemen,” she added.

The war has killed more than 150,000 people and displaced millions, creating the world’s worst humanitarian crisis, the UN says.

But there have been hopeful developments in recent weeks. Following the truce, Yemen’s president-in-exile handed over his powers to a new leadership council that is tasked with carrying out peace talks with the Huthis.