Young men are particularly liable to become fanatics. Every dictator, every guru, every religious leader, knows this. Fanatics have an overwhelming sense of identity based on a cause (a religion) or a community (gang, team), and a tight and exclusive bond with other members of that group. They will risk injury, loss or even death for the sake of their group. They regard everyone else as outsiders, or even enemies. But why are so many of them young males?

In a world of nation-states, young men fought the wars that formed most countries. The same goes for tribes, villages and factions. Young males have qualities that specialize them for this essential function. They readily identify with their group. They form close bonds with its other members. They are prone to follow a strong leader. This is why young males are so vulnerable to environmental influences, such as the prevailing culture in which they happen to live, and why they are so easily attracted by charismatic leaders or lifestyles that promise membership of restricted groups with sharply defined objectives and values. They like taking risks on behalf of their group – and they usually underestimate the danger that such risks represent. If they didn’t have these properties, they would be less willing to go to war, and therefore less able to fulfil one of their essential sociobiological roles.

Why are young men like this? Part of it seems to depend on testosterone, acting on their brain during early foetal life. Exposure in the womb ‘masculinises’ the brain – giving it certain properties, including sexual identity as a male, as well as a preference for play patterns that involve physical contact and even play fights. We know this because girls exposed to abnormal levels of testosterone during this time show similar behaviour, but much less otherwise. At puberty, there is another surge of testosterone acting on this already-prepared brain: this not only awakens sexuality, but encourages various strategies for competing for a mate – including the use of aggression and risk-taking behaviour. But testosterone is far from the only factor in making a fanatic.

Testosterone acts on an ancient part of the brain, the limbic system. The human limbic system looks very like that in other primates, such as chimpanzees, and is even easily recognisable in rats. But this part of the human brain is regulated by a more recent addition: the frontal lobes, which lie behind your forehead. Folk usage recognises their importance: in a hangover from the age of physiognomy, we call bright people ‘highbrow’, reflecting their tall foreheads (and thus their assumed larger frontal lobes). Among their other functions, the frontal lobes are important for personality, social interactions ­– and restraint. Damage to them results in impaired and inappropriate social behaviour, as well as lack of judgment.

Crucially, males’ frontal lobes don’t fully mature until their late 20s, whereas those of women mature earlier. This part of the brain is highly reactive to social cues and the behaviour of other people. The stereotyped young man – loud, risky, unreasonable, aggressive (but also non-conformist and thus innovative) – might be one result. So while it’s an evolutionary advantage to the group as a whole, a combination of rampant testosterone and an immature frontal lobe also explains why young men like taking risks and why they are liable to fanaticism.

Of course, not all young men, even the fanatics, become terrorists. Young men are not all the same. Different outcomes might be due to different social factors. Many terrorists come from criminal or deprived backgrounds. We know that a neglected or abusive childhood can result in antisocial or deviant behaviour later in life. An individual’s social environment, particularly early in life, can have long-lasting behavioural implications. We are beginning to learn something about how these conditions can result in persistent or even permanent changes to the brain, but so far we cannot do much about undoing them. We call people who have disregard for normal human relationships ‘psychopaths’, implying that they have abnormal (pathological) events in their ‘psyche’ (mind). We also know that there are people who develop genetically abnormal social traits (autism is one example) irrespective of upbringing. We do not know the precise defects in the brain that are responsible. Nevertheless, their nature – abnormal social behaviour and inter-personal relationships – points towards the frontal lobes, though other areas of the brain can also be involved.

Social status is prized by the males of many animal species, including humans. Several non-human primates maintain clear-cut dominance rankings. Higher status gives increased access to food, shelter and mates. It’s mostly based on physical prowess, and males fight or threaten each other to determine their relative position.

This also occurs in humans, of course. And yet the human brain has developed other ranking systems, including those based on money, birth or technical ability. The development of projectile weapons has reduced our dependence on muscular strength, but emphasised other traits, such as ruthlessness, bravery and leadership. Within fanatical groups, there is much competition to show qualities that increase a member’s standing with others in the group. This might be particularly attractive to those who, in the rest of life, have little cause to think they rank highly.

Terrorist or aggressive acts, therefore, can be carried out to prove a member’s worth, and attract the kind of attention that seems otherwise unattainable. It’s a modern way to satisfy an ancient biological need, for the respect that individual males crave. In summary, the propensity of the masculine brain is to form bonds with other males (eg street gangs), to recognise and identify with groups, to defend those groups against others, and compete with them for assets. A young male’s hormonal constitution and the way his brain matures together increase his susceptibility to fanaticism, an extreme instance of bonding, and make him prone to taking risk-laden actions on behalf of his group.

The human brain has invented additional categories of identity seemingly unknown in other species, including those based on common beliefs or ethical points of view. Today, identity is increasingly based on beliefs. The huge human brain has enabled the invention of weapons; these have given fanatics increasingly effective means of achieving the primitive aim of dominance by terrorising others. The path to fanaticism will be influenced by a male’s genes, his early experiences, his hormones, the maturity or otherwise of his brain, and the social context in which he finds himself. All these can result in a brain state we label fanaticism, a dangerous mutation of a role that is biologically essential for young men. Our task is to recognise what that brain state might be, how it arises and, if possible, to counter it.