Marwan* was 15 and ready to die. On his slender frame, the suicide vest, laced painstakingly with explosives, was barely noticeable under the loose-fitting tunic of his salwar kameez.
He had been trained for this day. He had been given his assignment, he had washed and offered his final prayers. Now he was going to die.
Peace returns to the Swat Valley
Ben Doherty reports from the Pakistan's Swat Valley where a fragile peace is returning after years of Taliban rule.
His target was an American convoy stopped at a border post near the Afghan-Pakistani border. Slipping past the security checkpost he began to run towards the trucks. His fingers gripped the switch. But, as he ran closer to the soldiers, he saw women holding babies close by to the trucks.
They would be victims too. Marwan hesitated. He stopped only for a second, but long enough for the security forces to grab him, to tear the detonator from his fingers and the bombs from his body.
Two years later, Marwan sits in a classroom in a school in Pakistan's beautiful but troubled Swat Valley. Sabaoon School - the Urdu name means the day's first ray of sunlight - is not a conventional school. Surrounded by the imposing mountains of northern Pakistan, the students here take their lessons behind fortressed walls and rings of razor wire. Their classrooms are guarded by soldiers armed with assault rifles.
Sabaoon is a rehabilitation and de-radicalisation centre for the boys caught fighting with Pakistan's militant extremists.
This is school for the youngest Taliban. There are 34 boys here. The eldest is 17, the youngest 10.
Sabaoon's Mental Health Supervisor, Afsarullah, who related Marwan's story to the Herald, says his was an extreme example of militant indoctrination of a vulnerable young boy.
''He was wearing a suicide vest and he had gone to the checkpoint to commit this act'' Afsarullah says. ''He was ready. He was prepared to die.''
Not all students at the school were would-be suicide bombers. Some performed peripheral work for the Taliban, spying on security forces and reporting their movements and numbers to insurgent camps. Some had volunteered for jihad. They had been trained in weapons and explosives, and were foot soldiers for the movement. Some had fought against, and killed, government and NATO troops in Pakistan and Afghanistan. Others were forced into service, taken from their families and put to work as porters, or as domestic help. Some were beaten, others raped by the mujahideen.
But there are those, too, who went to live in the insurgent camps because that was the place they knew they would be fed.
The head of Sabaoon School, Major Islam, says the single largest factor that drives children to become agents of terror is simple poverty. Students don't come to Sabaoon espousing anti-Western vitriol, they are not compelled to violence by drone attacks on their village, or by religious antipathy. They end up here because they are poor.
''Poverty is the biggest factor,'' Islam says. ''Many of them come from big families, there are 10 children and the father cannot afford to feed all of them. So, some boys he sends to the madrassa where they will be cared for. It is here that they are radicalised by the mullahs. Others go to the terrorists' camps because they want to eat, and they know they will get food there.''
But, he concedes, suicide bombing has attracted a sinister glamour in parts of Pakistan. Children as young as nine have been caught being prepared for attacks. Last year, a video circulated on the internet of a group of young Pakistani boys, some just toddlers, ''playing'' suicide bomber, staging a mock blast.
''It is true some do it to be famous; they want to be a hero in their community,'' Islam says.
Sabaoon is kept secure by the army, but the school is run by a Lahori non-government organisation, the Hum Pakistani Foundation. Classes are remarkably normal. The boys, many of whom have never been to school before this, take careful notes as their civilian teachers transcribe lessons on ageing whiteboards. ''Knowledge is Power'' a sign above one board says.
The students take lessons in maths, science and English. Most of these boys are native speakers of Pashto, a regional language in north-western Pakistan, so they are taught, too, to read and write in Urdu, the national language.
Some of the older boys are taught a trade, as electricians or refrigerator repairmen. The goal is to make the boys employable.
In class, the students wear uniforms of green and white, the colours of the Pakistani flag, and stand to answer questions. The older ones are allowed to grow beards, kept short by a barber at the school. The boys must also take religious education, detailed studies of the Koran with moderate scholars, whose aim is to de-radicalise them from the extremist teachings they have learned. They attend one-on-one counselling sessions.
Afsarullah says some students come to Sabaoon having experienced significant trauma, having killed, and having lost friends and family members. Many suffer post-traumatic stress and other mental health issues.
''Each and every case is different,'' he says. ''We talk to them about their past, their family history. Sometimes, particularly with the students we classify as high risk, they don't want to let you in in the initial stages, they won't talk. But we keep working with them. This is very important for them.''
Case workers speak with family members and village elders to build up a picture of a student's involvement in the militancy.
''It can take time, but we have to need to make a complete assessment,'' Afsarullah says. ''We need to know about their family background and the village they come from.''
In class, discipline is strict. The chance to visit home and family at weekends is the carrot offered to students; rigid military discipline - the soldiers here are always armed - is the stick. The students get few visitors behind the walls and the wire, and most seem interested, and keen to practice their English, when the Herald visits a classroom.
They cannot be identified out of fear for their security and they do not speak readily of the militancy of their past. Rather, they talk of plans for the future. Some want to be teachers, another a computer technician. One wants to be a doctor, the first for his village.
''I have never been to school before. I am happy to have an education, so I can get a job and care for my family,'' one boy, about 12 and in the youngest class, says.
Sabaoon's scholastic results are extraordinary, particularly for a country where the public school system is weak and underfunded.
In the past two years, Sabaoon has had a 100 per cent pass rate for state-administered exams. But passing tests doesn't guarantee graduation from Sabaoon. The military must be convinced the student won't go back to the Taliban fold. Family members and villages are assessed for militant activity.
And even when they are gone, the army keeps a close eye on all those who pass out of Sabaoon. They are helped to find jobs or start a business and, for their first year, required to report regularly to police. Some do relapse, leaving the school only to rejoin the insurgency. Six students have been brought back to the school after being released.
But in a country that too regularly stumbles in its fight against terrorism, Sabaoon is a rare success story. The school was established to de-radicalise the youth of the Swat Valley, as it recovered from Taliban rule in 2009. Most of those have been ''passed out''.
Now, Sabaoon is being sent students from all over Pakistan. Most come from areas near the border with Afghanistan, where the extremist influence is strongest.
The hope for Pakistan is that one day, a school like Sabaoon will no longer be needed.
But sadly for this country there appears no end to the ready supply of students to come here, vulnerable boys hardened into killers.
* Name has been changed.
with Khudayar Khan