ONE of the worst dilemmas soldiers face is what to do when they confront armed children. International law and most military codes treat underage combatants mainly as innocent victims. They offer guidance on their legal rights and on how to interrogate and demobilise them. They have little to say about a soul-destroying question, which must typically be answered in a split second: when a kid points a Kalashnikov at you, do you shoot him? Last month Canada became the first country to incorporate a detailed answer into its military doctrine. If you must, it says, shoot first.

Such encounters are not rare. Child soldiers fight in at least 17 conflicts, including in Mali, Iraq and the Philippines. Soldiers in Western armies, sometimes acting as peacekeepers, have encountered fighters as young as six on land and at sea. More than 115,000 young combatants have been demobilised since 2000, according to the UN. For the warlords who employ them, children offer many advantages: they are cheap, obedient, expendable, fearless when drugged and put opponents at a moral disadvantage. Some rebel armies are mostly underage.

In 2000 a group of British peacekeepers in Sierra Leone who refused to fire on children armed with AK-47s were taken hostage by them. One paratrooper died and 11 others were injured in their rescue. Soldiers who have shot children sometimes suffer from crippling psychological wounds. A Canadian who protected convoys in Afghanistan from attack by young suicide-bombers has not been able to hug his own children since he came home four years ago. Some soldiers have committed suicide. “We always thought it was the ambush or the accident that was the hardest point” of a war, said Roméo Dallaire, a retired Canadian general, in testimony before a parliamentary hearing on military suicides in March. In fact, the “hardest one is the moral dilemma and the moral destruction of having to face children.”

The Geneva Convention and other international accords prohibit attacking schools, abducting children and other practices that harm them. But they do not tell soldiers what to do when they confront children as combatants, making self-defence feel like a war crime. On March 2nd Canada adopted a military doctrine that explicitly acknowledges soldiers’ right to use force to protect themselves, even when the threat comes from children. “A child soldier with a rifle or grenade launcher can present as much of a threat as an adult soldier carrying the same armament,” it says. It is based in part on research by the Child Soldiers Initiative, an institute founded by Mr Dallaire that works towards ending the use of children as fighters.

The new doctrine goes well beyond the moment of confrontation. Intelligence officers, it says, should report on the presence of child soldiers and how they are being used. Soldiers deployed in areas with child fighters should be prepared psychologically, trained to handle confrontations with kids and assessed by psychologists when they return. The instruction suggests ways to ensure that killing children is a last resort. It recommends shooting their adult commanders to shatter discipline and prompt the youngsters to flee or surrender. It warns against the use of lightly armed units, which are vulnerable to “human-wave” attacks by children.

The authors of the new directive seem to be aware that a policy to shoot child soldiers even in self-defence could provoke outrage. So far, human-rights groups have expressed understanding. Canada is trying to strike a balance between treating children as innocents and recognising them as battlefield threats, says Jo Becker, a children’s-rights specialist at Human Rights Watch in New York. Britain is considering guidelines of its own, and other countries may follow. Canada may soon put its doctrine to the test. Its government has promised to send 600 troops on a three-year peace mission to Africa. It has not revealed yet where exactly they will go. Wherever it is, they are likely to meet gun-toting children. By acknowledging their right to defend themselves, Canada’s government may lessen the trauma of those forced to fight the youngest warriors.