Anton Lundin Pettersson asked to take time of from his apprenticeship, spent all his money and wrote a farewell letter, according to a preliminary police investigation into the deadly attack in Trollhättan, south-western Sweden, last October.
Police said the attack was racially motivated and Pettersson, 21, deliberately chose a school with a high proportion of immigrant pupils.
A search of his online history showed that he had looked at and saved images and films that propagated racism, Nazism, and anti-Muslim sentiment.
Pettersson killed a 17-year-old pupil, a 20-year-old teaching assistant and a 42-year-old teacher, who died from his injuries in December. He then died himself after he was shot by the police.
A profile of the attacker which has now been made public, describes a young man who was considering committing suicide in the months before the attacks.
But once he decided to carry out a massacre he was sure that he too would be killed, leaving behind a letter explaining that he would not be coming home, the report says.
In the two weeks before making his way to the Kronan school the 21-year-old got a haircut and picked out clothes to wear and music to listen to on the day of the attack.
He was not under the influence of any substances, the report says.
The preliminary investigation shows that the killer acted alone.
“It was important for us to show that he did not have an accomplice,” said police spokesman Thomas Fuxborg.
Police did not find evidence to suggest Pettersson discussed his extreme right-wing values or ideologies “in a structured way”.
They did however find racist material he had used on internet forums, often when making jokes.
Pettersson sought out dark-skinned victims but refrained from attacking a number of people whose paths he crossed, including younger pupils, women and children.
A lot of people in the town continued to feel threatened after the attacks, according to Sten-Rune Timmersjö, who heads the police’s serious crimes unit in Fyrbodal.
“There are always knock-on effects,” he said.
Police have ramped up their presence in parts of the town, he added.
When The Local visited the town in November the attack was still very fresh in people’s memories.
"The children still need to talk about it all the time, every day," youth worker Mia Jansson said.
"Lots of them have experience of war, and these feelings are somehow coming out again.”