The Colombian government says it has agreed a road map for the release of child soldiers from the ranks of the left-wing Farc rebels.
The document drawn up at the peace talks in Havana will give priority to Farc recruits under the age of 15.
They will be treated as victims of war and will be pardoned when Colombian law permits it.
The accord will extend to all fighters under 18 and the children will be returned to their families if possible.
The Farc agreed to help identify the children and organise their departure from their military hideouts.
The UN and other agencies are to be invited to oversee the children’s reintegration into society.
Both sides have not said how many children and adolescents in total still remain in the Farc although the group has said it has 13 soldiers aged under 15 in its ranks.
According to the government’s child protection agency, around 6,000 children have left armed groups in the last 17 years of which 60% belonged to the Farc.
Hoping to sign a peace deal in the coming weeks, the government and Farc agreed to use constitutional means to protect the accord from political interference in the future.
Both sides are still negotiating the terms of a permanent ceasefire.
They have already signed accords on agrarian reform, the transformation of the Farc into a political party, on justice and the war against drugs and on de-mining and the search for the disappeared.