In tribal areas of northern Pakistan, the army is using vocational education - including courses in embroidery, carpentry and tailoring - to turn young men away from Islamist violence.
Prisoners of the Pakistan Army's Frontier Corps, who have been held in jail for their connections to militant groups, are being released if they complete vocational training and renounce their links to terrorism.
So far, around 80 men have completed the first two phases of the programme, taking one of the specially designed courses in a range of trades. The aim is to target disaffected young men who have been or are in danger of being influenced by the Taliban, but are currently deemed to be relatively low-risk.
After the 12-week courses, participants are awarded certificates and attend special "passing out" ceremonies at which they demonstrate their new skills and exhibit their work.
The programme, which started in the Swat district near the Pakistan-Afghanistan border, has since spread to the Bajaur and Mohmand parts of the Federally Administered Tribal Areas.
Last month, 47 former militants were granted their freedom in the Bajaur area. Speaking at their graduation ceremony, the region's political leader, Syed Abdul Jabbar Shah, said such initiatives would bring a "new dawn" of peace and prosperity, and that participants had a vital role to play in combating terrorism, according to a report in The Express Tribune, which is published in partnership with the International Herald Tribune.
The sector commander of the army, Brigadier Haider Ali, urged the graduates to resist militancy in future, the paper reported.
Ulrich MacDonald, an educational adviser with German international aid agency GIZ, who has spent more than two years in the region helping to improve education, told TES that the kind of vocational training being offered by the army was urgently needed.
"One of the biggest problems in the region is that employment is virtually non-existent, and there is no proper economy," he said. "There is a basic education, but there are no proper job-preparation classes, so these young men drop out of school with no idea of what to do next.
"As a result, it is very easy for them to fall into the hands of the Taliban, or other militant extremist groups. The more education and training they have, the more opportunity they will get to have a job and a decent income. Something like this could really help solve the problems with militancy in the region."
A Peshawar-based journalist, who has reported extensively on militancy in the region but did not want to be named, said that the main reason for young men to get involved in armed conflict was poverty.
"The thinking is, if they can be skilled, they can earn a respectable livelihood once they are released," he said. "Local people are mostly supportive of the process; they consider it a good step forward in rehabilitating these men.
"But while any effort is commendable, this is not going to be enough to stop the problem. At the moment, this is a small-scale effort and much more needs to be done."
Burzine Waghmar, a member of the Centre for the Study of Pakistan at SOAS, University of London, also cast doubt on whether education would be enough to heal deep-rooted tribal and ethnic divisions.
"It will work for some people but not across the board," he said. "Some will turn into good people, but others will tell the army what they want to hear to get out of prison, then carry on with what they were doing."