Anders Behring Breivik, the 33-year-old who has confessed to murdering 77 people in two attacks in Norway, has been charged with committing acts of terror.
Breivik, whose attacks shocked Norway, harboured radical right-wing views and had railed against what he saw as a Marxist Islamic takeover of Europe.
While Breivik openly expressed his views online, there was little to indicate that the young man - described by friends as quiet, friendly and ordinary - would go on to kill dozens of people, many in cold blood.
The turning point seems to have come in his late 20s, when his paranoia grew about the "Islamisation of western Europe". After his arrest, he made no apology for the attacks, which he has described as "atrocious, but necessary" to defeat immigration.
There has been much speculation as to whether he was insane at the time of the killings. Two psychiatric analyses reached contradicting conclusions.
An initial court-ordered assessment concluded he was a paranoid schizophrenic, but a second report in early April ruled that he was not psychotic.
The issue will be at the centre of his trial, due to start on 16 April, and will determine whether he should be sent to a psychiatric ward or jail.
'Policy of hatred'
It is perhaps Breivik's diary - part of his dense, wordy manifesto - that gives the most insight into his thought processes.
In it, he describes how in early May 2011, he had prepared and stored his equipment for the attack. He talks of his paranoia at the number of police vehicles he sees near his home, wondering where he would hide, were they to pay him a visit.
"It's one of the scariest documents I've ever read," forensic clinical psychologist Ian Stephen told the BBC.
"It's written by a man who is absolutely meticulous in his development of his philosophy and he has researched everything, obviously shut away for a long period of time reading, researching, digging into the internet, reading books," said the psychologist.
"[He] formulated this absolute policy of hatred of anything that is non-Nordic in a sense, and looking at planning how to take over the world [in a] rather insane, over-complicated deluded manner."
A 12-minute anti-Muslim video called Knights Templar 2083, in which images of Breivik appear, was also discovered online.
He appears to have created entries on social networking sites such as Facebook and Twitter, though the accounts were set up on 17 July, only five days before the attacks in Oslo and on the island of Utoeya, where a summer youth camp of the governing Labour Party was taking place.
On the Facebook page attributed to him, he described himself as a Christian and a conservative. The Facebook page is no longer available but it also listed interests such as bodybuilding and freemasonry.
A Twitter account attributed to the suspect also emerged but it had only one post - a quote from philosopher John Stuart Mill: "One person with a belief is equal to the force of 100,000 who have only interests."
Breivik was also a member of a Swedish neo-Nazi internet forum called Nordisk, according to Expo, a Swedish group monitoring far-right activity.
'Price of treason'
According to court officials, he said he had been trying to "save Norway and western Europe from cultural Marxism and a Muslim takeover."
"The accused explained that the Labour Party has failed the country and the people and the price of their treason is what they had to pay," said the judge in the case, Kim Heger.
He has admitted to carrying out the twin attacks, but has not pleaded guilty to charges of terrorism.
His 1,500-page manifesto - authored by "Andrew Berwick", the Anglicised version of his name - gives a detailed account of the author's "preparation phases", apparently for an "armed struggle" which he says seems "futile at this point but... is the only way forward".
The manifesto, called 2083: A European Declaration of Independence, minutely elaborates the author's belief that a process of "Islamisation" is under way.
During this preparation, the author details how he sets up front companies to allow the purchase of fertiliser, which can be used in bomb-making, and the steps he takes to obtain powerful guns - including joining a firearms club in 2005 to increase his chances to obtain a Glock 17 semi-automatic pistol six years later.
He also claims to have bought three bottles of 1979 vintage French wine, and decides to open one with his family at Christmas as his "martyrdom operation draws ever closer".
Breivik was previously a member of the right-wing Progress Party (FrP), the second largest party in Norway's parliament. He was also a member of the FrP youth wing from 1997 to 2006/2007. He deleted his membership in 2007.
Breivik was born on 13 February 1979 in Oslo. His mother had become pregnant in London where his father, a diplomat, had been posted. Jens Breivik - long estranged from his son - has expressed shock at the crime.
"I view this atrocity with absolute horror," he was quoted as saying by London's Daily Telegraph newspaper from his home in south-west France.
He divorced Anders' mother, a nurse, when their child was one year old, moved to Paris and married again. From then on, he had limited contact with the boy.
Their relationship broke down when Anders was a teenager, and the father and son have not spoken since then.
Breivik said on his Facebook page that he was a student at Oslo Handelsgymnasium, a high school that specialises in business studies, Norwegian media reported. He also claimed to have educated himself beyond that, but not through any formal educational establishment.
A school friend told Norwegian TV he did not recognise him as the boy he knew.
"One of his good work-out buddies was from the Middle East, and it seems as though they were good friends all through junior high school, and hung out a lot together," Michael Tomala said.
"It seems as though he has taken a completely different direction than what we knew of him from junior high school."