On an August afternoon in 1995, John Hron, a defiant anti-racist, was tortured and beaten to death by neo-Nazi skinheads beside a picturesque lake near his home town of Kode in Kungälv, Sweden. He was 14.

Neo-Nazis were gaining a foothold in Kungälv, an industrial borough of 20,000 people on the west coast, for the first time since the second world war. Sweden’s economy had stuttered in the early 1990s after a financial crisis and its politics were in flux.

Racism is not something you can get rid of – it is an ongoing battle Christer Mattsson

Twenty-four years later, Sweden’s neo-Nazis are again targeting Muslims and Jews, buoyed by anti-immigrant sentiment in the country that has seen the radical nationalist Sweden Democrats make electoral gains.

After terrorists attacked two mosques in New Zealand in March, killing 50, the massacre was hailed by members of the so-called Nordic Resistance Movement, an openly Nazi group.

And today, 1 May, the group is marching in uniforms through Kungälv city, which it is targeting because of its historical links to Sweden’s war-time Nazis.

Tess Asplund tries to block Nordic Resistance Movement members as they march through the town of Borlänge, Sweden, on a 1 May rally in 2016. Photograph: AP

But Kungälv has changed over the past two decades. Galvanised by Hron’s murder, the municipality has developed a quietly successful initiative to prevent recruitment of young people by racists.

After the tragedy, Kungälv hired Christer Mattsson, a local teacher and researcher, to plan its response. He says the problem was not Kungälv as a whole, but small parts of it: “Hate is always local.”

So he and his co-researchers created the Tolerance Project, starting with Ytterby, a large school where the neo-Nazis were very active.

Q&A When Europe gets it right Show As a series of crises puts Europe under strain, some cities are fighting back with innovative solutions. From hyper-specialist shops beating the online threat in Berlin to the Bulgarian city reversing the country's brain drain, from the Italian city finding new ways to tackle addiction to gambling to the Swedish town that has found innovative ways to combat extremism, we look at what European cities are doing to live better in our increasingly urban world.

“Back then we had a big problem at the school, a lot of trouble with neo-Nazis in the neighbourhood,” says Therése Kraffke, the school’s headteacher.

In 2001, Kraffke, Mattsson and other teachers started to hold workshops with a mixed group of girls aged 14 to 16, including those who hung out with the skinheads.

“The skinhead core was mainly boys,” Kraffke says. “We reasoned that if the girls stopped supporting them, they wouldn’t have people around them.”

Fredrik Vejdeland of the neo-Nazi Nordic Resistance Movement speaks at a rally in Kungälv. Photograph: Adam Ihse/EPA-EFE

The culmination of the project was a week-long trip to significant Holocaust sites in Poland for which students had to hand over their phones, ensuring their attention was concentrated on their experience and the group around them. The visit encouraged each student to think about who they were, what shaped their attitudes, and how to deal with emotions such as anger.

Madeleine, who asked that her surname not be used, was one of the first girls to participate. Aged 14, Madeleine had started to shave her head and wear boots and a bomber jacket just like the neo-Nazis. She scrawled SS symbols around Kungälv and hung out with white supremacists, drinking and smoking.

“It was just a cool thing, but it was starting to mean something,” she recalls. “I started yelling at people with dark skin, being really aggressive.

“In my group, to be angry and hateful was seen as good thing – my identity was the hard girl who is angry all the time. The climate was so bad at the school against black people, Muslims and Jews. The white people were the ‘right’ people.”

Madeleine, who was one of the first teenagers to take part in the Tolerance Project. Photograph: David Crouch/The Guardian

As part of the Tolerance Project, Madeleine started to mix with girls from other backgrounds. They talked about why people hate each other and learned about the Holocaust. During her six months on the project, she found herself for the first time among people who listened to her and respected her.

“I think about what would have happened to me without that experience. I would probably be a Nazi’s girlfriend today,” says Madeleine, now 31 and a teaching assistant. “I didn’t have the network around me to get out of it.”

The approach has become known as the “Kungälv model” for tackling racism among teenagers, and its techniques are practised in more than 60 schools in Sweden. In Kungälv itself, the programme has inoculated a generation of young people against right-wing extremism.

Loa Ek took part in the Tolerance Project in 2012. She was 14 and by her own admission a difficult child who was skipping classes and failing exams.

Loa Ek, a former Tolerance Project participant. Photograph: David Crouch/The Guardian

“It was hard for me to keep my mouth shut at first but I calmed down – nobody judged me,” says Ek, 21. “It was a safe space – it helped me to understand and control myself. We learned how easy it is to manipulate people through racism.”

Ek’s outspoken nature now has other targets. “It irritates me so much when people don’t like immigrants,” she says. “I tell them to go read some books.”

Breaking down the barriers between groups of school students is key to success, according to Maarten van Zalk, professor of developmental psychology at the University of Osnabrück in Germany, whose research has measured the impact of the Kungälv model on pupils’ outlook and opinions.

“When you are part of a racist subculture, it is unlikely you will interact with immigrant students,” he says. “With the Tolerance Project they are strongly encouraged to engage, and with the engagement they break the circle. The more they break that circle, the higher the level of tolerance.”

A 2013 study backed by diversity and anti-racism organisations estimated that the economic benefits of the project, measured in terms of preventing damage to society caused by neo-Nazi gangs, outweighed the investment required by a factor of 20. A 2018 study by a researcher at Birmingham University concluded that the project had led to “an increased sense of security, less vulnerability, and most important of all, less hatred”.

Christer Mattsson at the Together for Kungälv concert in 2015. Photograph: Courtesy of Louise Eklund

Cristine Lysell, who is currently in charge of upper secondary school education for Kungälv council, saw for herself the changes at Ytterby school, where she was a teacher when the neo-Nazis were at their height.

“The racism started to disappear – it became more calm and students started to react when they heard people express racist views,” Lysell says. “Everyone in the school was standing up for integration. Then we began to realise the hard work was paying off.”

Today the neo-Nazis do not recruit from Ytterby school, Kraffke says. “They are strong here, their leader lives nearby. But they don’t target the school, they have nothing to get from us.”

A student from a neighbouring school was so moved by her experience of the Tolerance Project that she and some friends organised a memorial concert for John Hron, 20 years after his death. Some 5,000 people took part.

“We called it Together for Kungälv – instead of saying we hate the racists, we wanted a message that was positive and inclusive,” says Louise Eklund, now 21.

“We wanted to show a society where everyone can feel safe and happy and live their lives, where we can understand that people are different.”

Louise Eklund, organiser of the Together for Kungälv memorial concert. Photograph: Courtesy of Louise Eklund

In 2015 the project’s success led to the establishment of the Segerstedt Institute at Gothenburg University, with the aim of developing and spreading the Kungälv model. The institute trains teachers and social workers to apply the methodology in their own environments, tailoring it to the specifics of youth culture and style.

“Doing so requires a highly complex, situated knowledge, the understanding of the local context – you have to be part of the fabric,” says Mattsson, who now runs the institute.

Each year, more than 800 Swedish school students go through the Kungälv model. But nobody should be tempted to think the work has been done and the problem is retreating, Mattsson says.

“If we stop doing this job, the racism will resurface in a different form in a year, five or 10 years, we don’t know,” he says. “Racism is not something you can get rid of – it is an ongoing battle.”

For Madeleine, neo-Nazi marches such as today’s are not the only reason the Kungälv model remains so necessary.

“When Notre Dame cathedral was burning, on Facebook [people] started blaming Muslims straight away,” she says. “Everyday racism is growing in the whole of Sweden.”

Follow Guardian Cities on Twitter, Facebook and Instagram to join the discussion, catch up on our best stories or sign up for our weekly newsletter