Ila prison is a desolate 1930s structure that squats just outside Oslo. Somewhere in Ila's solitary wing, a not quite middle-aged blond man with a receding hairline, a high, reedy voice and a nose that as a teenager, he had, for reasons of vanity, reconstructed by a surgeon's knife, is planning his great future.

Four years ago, aged 32, Anders Breivik murdered 77 people - most of them children, many shot in the face at close range, trapped on the small island of Utoya. He shot them dead in the water when they tried to swim to safety and winkled them out of their hiding places behind rocks or pieces of furniture. Dressed as a police officer, he promised to help them - then out would come his semi-automatic Glock 17.

One might hope that, serving his 21-year sentence in solitary, Breivik has nightmares about what he has done, but this is not so. He prides himself on the murderous events of July 22, 2011, a pre-emptive dismantling, as he sees it, of the next generation of left-wing enemies of Norway: feminists, "cultural Marxists", multiculturists and so on. The idea had come to him a year earlier in the squalid little spare room of the apartment he shared with his mother.

The car bomb he detonated beneath government buildings in Oslo and the shooting dead later that day, on Utoya, of 69 mostly teenage members of the youth league of the Norwegian Labour Party were, in his opinion, "the most sophisticated and spectacular attack in Europe since the Second World War". It had been, he told the police, when they arrested him, "the worst day of my life. Unfortunately it was necessary".

He was pretentious and staggeringly grandiose. As if recalling a great historic event from the vantage point of the distant future, he said: "It's a nightmare that I don't think you can understand until you've carried it out. And I hope you won't have to experience it, because it was sheer hell. Taking another person's life."

Before his trial, two sets of forensic psychiatrists interviewed Breivik. The first pair decided he was a paranoid schizophrenic, therefore, legally, not responsible for his acts. There was an outcry. The replacement psychiatrists came up with a vaguer diagnosis - something about narcissistic personality disorder - but nothing that would see him escape prison for an asylum.

The question as to whether this strange, pretentious, robotic man is mad or sane, how he came to be one or the other, or possibly both, has finally been pieced together in a very fine book, One of Us: The Story of Anders Breivik and the Massacre in Norway by Åsne Seierstad. It challenges the notion that the events of July 22 came out of nowhere.

A rival book by Breivik's father, Jens Breivik, was published a couple of weeks ago. Its title translates as, "My Guilt". Does Breivik's father still love his son, someone asked him in an interview. The question, you realise when reading Seierstad's account, should have been: Did he ever?

Seierstad discovered in Jens a cold man who had difficulty relating to other people. Anders was 15 years old the last time he saw his father. Sooner or later Jens would lose or terminate contact with all four of his children.

Seierstad also spoke to Anders' mother, Wenche Behring. The interview took place only three days before Behring's death from cancer in March 2013, and Behring spoke more openly than ever before. She had become her son's prime care-giver after she and Jens divorced, when Anders was just over a year old. Behring was in a psychiatric hospital suffering from a breakdown soon after her son was arrested - she did not appear at his trial. Within weeks of his conviction, in August 2012, she was in a hospital bed with cancer.

In the final years of her life, Behring described him to friends as a wonderful person best suited to join the Red Cross, helping starving children in Zambia. Yet her attitude towards her son was far more ambivalent when he was a boy. "Some time, after Anders grew up, the power dynamic between the two of them switched," says Seierstad.

When he was still in the womb, Behring half-regretted that she had left it too late to abort him. When he was born, she found him defective. As a toddler, she wanted him medicated for tantrums that only she seemed to witness. Mother and son came to the attention of social services. Seierstad quotes extensively from their reports: one or two of them come close to being clairvoyant. They describe Behring as an unstable mother, thought to be suffering from borderline personality disorder, as exemplified by the abrupt vacillations of her feelings towards her son between overt love and disgust. "I wish you were dead," they heard her say to him. "Anders's care situation is so precarious," a child psychiatrist warned about the boy, then three, "that he is at risk of developing more serious psychopathology."

When, on July 22, 2011, police confronted Behring about what her son had been doing on Utoya, the first thing she said was: "How could he do this to me?" The second was: "It's almost worse than being lesbian or homosexual. It's the very worst thing that could happen to a person. What will people say about me?" Seventeen years earlier, a friend of Anders had finally spelt out to him what everyone in their circle took to be self-evident: "Anders," he said gently to his friend, "come out of the closet." Breivik was already in the process of carving out a narrative about himself that bore little resemblance to reality. He talked eagerly about prostitutes; complained that feminism had ruined women and emasculated men such as himself; listed as his mother's carer, he had been exempted from military service. He seemed uninterested in women, then suddenly ordered a mail-order bride from Ukraine whom he fell out with and never married.

By the time Jens cut him off - after Anders was arrested for the second time for vandalism (he'd styled himself a graffiti artist), he had decided he was a lazy, apathetic creature. The last time father and son spoke was on the phone. Anders had made the call. The conversation went nowhere. Anders was 26. The next year his mother persuaded him to move in with her.

I meet Seierstad in Oslo. "A mother without boundaries," is how Seierstad describes Behring. We're outside a purpose-made residential block on Hoffsveien, a noisy arterial road in Oslo's Skoyen district. Seierstad points out a corner apartment on the first floor: it's where Breivik and his mother lived in the five years leading up to Utoya. It's the kind of apartment complex that appeals to Norwegians of retirement age. Anders would have been one of the only young people around, though rarely seen, so busy was he on his computer, writing his "great book", so his mother would half boast to her friends. One of the things her son was actually writing was this, in his diary: "My mother was infected with genital herpes by her boyfriend when she was 48. She now shows the intellectual capacity of a 10-year-old."

The layout of the apartment implies something not quite right about relations between mother and son. There is only one bathroom and, to get to it, Anders would have had to pass through his mother's bedroom.

When he was little, things at home seem to have been more intimate still. In public, Behring, we know from the social workers' notes, would aggressively discuss her sexual fears and fantasies in inappropriate settings, such as her son's kindergarten. Seierstad tells me about neighbours of Behring's during Anders' childhood who had felt uncomfortable about the number of men coming in and out of her apartment at night. A woman remembers meeting Behring when she was six. Behring had told her that the geometric patterns on her bedroom curtains "look like people f***ing''.

There are other troubling stories in Anders' childhood: Behring complaining to a social worker that her five-year-old son pressed up against her at night and would "force himself on her''; Behring talking about the undressing game she played with Anders - who can get their clothes off first? There were times when Behring became depressed to the point of near incapacity. Social services arranged for a married couple to look after Anders on weekends but they were disconcerted when Behring asked Anders' weekend-father to allow Anders to touch his penis as she felt it was important for a boy's sexuality. On her death bed, Behring hinted strongly to Seierstad that she had been molested by her brothers.

Breivik's retreat behind a grandiose false mask, and the paranoia and bitterness that would fuel his attacks in Utoya, began in his teens. At 18, he joined the far-right Progress party; thwarted in a political career, he played the stock market, then set up a half-baked operation selling fake diplomas online. He made money. Yet when he moved back with his mother he began to degenerate. He stopped working out, his interest in computer games became all-consuming. He then turned his attention to militant anti-Islamic websites. He became more reclusive, emerging from his bedroom covering his face with his hands or a mask.

His mother did his cooking and cleaning. Much later, she would tell police she thought something was wrong from 2010 but Anders scared her.

It's not true that Behring had the intelligence of a 10-year-old. But among the questions she never asked her son were: Why is there a semi-automatic Sturm Ruger rifle in your room? What's in the parcels you keep getting in the post? Why are there rucksacks of rubble outside your bedroom door? What are you storing in the communal attic?

In 2009, Breivik registered Breivik Geofarm, allegedly a farming company specialising in melons, roots and tubers. By October 2010 he had started ordering bomb-making equipment off the internet. Most of these items arrived at his mother's house via the post. In May 2011 he ordered smoke grenades, tyre-shredding spike strips, flashing blue lights, a GPS, silencers and firearms magazines. Still, his mother didn't twig. In late June he rented a farm, 140km north of Oslo, and moved there the same month, not to grow melons, but to construct a bomb.

Breivik attended shooting classes at the Oslo Pistol Club to get his licence. His only girlfriend told Seierstad that Anders enjoyed discussing guns. Then again, so did lots of people.

Only twice did the young Anders show a tendency to violence. There's a story that, as a boy, he once smeared a cat's anus with mustard. Then, in his self-consciously rebellious teens, he once punched his headmaster in the chest. But generally, he was a nondescript social irritant who was odd in a way never quite strange enough to merit concern.

His mother and father met in the laundry of a building they were both living in at the time. Jens was divorced, with three children he never saw. Behring had a daughter by a man whom she had deleted from her life. Now she became pregnant again. The couple married. Soon afterwards, Jens was posted to London. His wife joined him at Christmas, her daughter, and six-month old Anders in tow, but she hated it, returned to Norway and filed for divorce. "You feel sorry for Anders when he is a child," says Seierstad. "Wenche is a bad mother. Maybe it's not her fault but she doesn't give him the care that a child needs."

Two years later, the child psychiatric reports on Anders are made: "The whole family is affected by mother's poor psychological functioning," reads one. "Anders is the victim of his mother's projections of paranoid, aggressive and sexual fear of men generally." There exists a "profoundly pathological relationship between Anders and his mother''. His mother lived in her head and couldn't relate to other people. The boy seemed to be suffering - he didn't cry when he was hurt and seemed to take no joy in life. Social services wanted him fostered. Anders's father, Jens, now living in Paris, stepped in but when his ex-wife threatened legal action, changed his mind about bringing Anders to live with him. A nursery teacher wrote a glowing report on the improvement in Anders' behaviour. The teacher was a friend of Behring's. Anders remained with his mother.

You would have to have a very hard heart not to feel sorry for the young Anders, says Seierstad. And a very soft one to feel any pity for the adult version. All his life, this empty boy-man was in search of a crusade. In the end he just made one up: the Knights Templar would lead the civil war and construction of new society. Breivik held the highest rank in the organisation and had been asked to write its manifesto, in 2002, at its inaugural meeting, in London. It was all a fantasy.

At Breivik's trial, a professor of psychiatry, Ulrik Fredrik Malt, briefed the court on his impressions of the defendant. "I did not see a monster. I saw a deeply lonely man." It was Malt's view that Breivik's "personality and extreme right-wing ideology are combined in an effort to get out of his own prison''.

It was a humble reading of Breivik's motivations, one that seems to fit what we now know about his inner life. A fifth psychiatrist characterised Breivik as "a failure". Of course, Breivik hated it. "I have never," he told the court, "been rejected by anyone in my whole life."

One of Us: The Story of Anders Breivik and the Massacre in Norway by Åsne Seierstad is published by Virago.

Irish Independent