Image copyright Getty Images Image caption Emergency services treat the injured after a car rammed demonstrators in Charlottesville

An anti-racism campaigner spent a year infiltrating the fringes of the white nationalist alt-right, and saw the real-world effects of extremist online ideology in Charlottesville.

Patrik Hermansson had thought the day's drama was over.

He had arrived at Emancipation Park in Charlottesville, Virginia, early in the morning of 12 August 2017.

There he joined a group of far-right and alt-right activists who were protesting against the removal of a statue of a Confederate US Civil War leader, Robert E Lee.

He found himself at the centre of an angry protest when the gathering was declared unlawful and armed alt-righters were marched out of the park by police. He witnessed scuffles and was sprayed with mace by an anti-fascist counter-protester. After a walk to another venue outside the city, it was time for some rest.

"I switched out of my clothes and walked back into town," he says. "I was just out getting lunch when I saw this big demonstration walk past."

These protesters were marching in opposition to the white nationalist and alt-right gathering in the park. Patrik stopped to watch.

That's when a car drove straight into the crowd.

"It ploughed through the demo and stopped five or 10 metres away from me," he says. "And then everything happened after that."

One woman, Heather Heyer, was killed by the car, and 35 others were injured. A man faces murder and other charges in connection with the attack.

The violence in Charlottesville that day drew new attention to the rising subculture of the alt-right - an amorphous collection of nationalists, traditionalists, race obsessives, hardcore Trump supporters and others who found each other online. They are a subgroup of the wider far right and often claim to be a new political vanguard, although critics say they are nothing but fascists who have learned how to use social media.

And Patrik Hermansson was well-placed to make sense of the events in Charlottesville and their wider impact. By then he had been undercover in the alt-right - in the UK, Europe and the US - for a year.

Image copyright Hope Not Hate Image caption Patrik Hermansson says his Swedish heritage helped get neo-Nazis to trust him

You might also be interested in

Online and off

"It's a simple process really," Hermansson says of his mission to infiltrate alt-right groups for the anti-racism campaign group Hope Not Hate. "You start by building a new identity, based on what you think they will like and what they will be interested in having in their organisation. And then you approach them, like any new guy interested in the far right would - via the internet."

Hope Not Hate recently released a study which found that membership of traditionally-organised far-right groups was at a low point - but that they are being replaced by new networks developing online. And recently the retiring head of counter-terrorism policing in the UK has warned of the growing threat of far-right terrorism, with four alleged plots foiled in the space of a year.

In attempting to infiltrate extreme groups, Patrik's back-story was that he was an exchange student, studying in London: "I wanted to appear academic, because I knew they were interested in having people that were academically minded."

His Swedish background also helped. Among the groups he frequented were many neo-Nazis who like fascists in the 1930s and 40s, lionise Swedes as an original "unspoilt" version of the Aryan race.

Image copyright Hope not hate Image caption While undercover, Patrik Hermansson took selfies of himself at rallies in the UK and the US

Follow BBC Trending on Facebook

"They believed that people from Scandinavia are more racially pure," he says. "And of course, that was a myth back then, and it's a myth now… but people said to me in very clear words, 'Oh, you are the master race.'"

His initial online contacts moved swiftly to face-to-face meetings. The first came at a small pro-Brexit demonstration in London in the autumn of 2016. Online video and news reports show that the rally was sparsely attended - at most a few hundred people showed up - and most participants were politically mainstream. "It wasn't a very extreme rally," Patrik recalls.

But among the activists at the pro-Brexit demo were more extreme types, including the organiser of a group that Patrik had been investigating called the London Forum. The Forum has hosted holocaust deniers and conspiracy theorists at its meetings. In a statement, a spokesman for the group said: "The London Forum comprises a range of people who care about their country and its demographic future and who wish to register their disagreement with the nigh ubiquitous enforced agenda of multiracialism and multiculturalism that threatens to destroy our identity irreversibly." There is no indication that the group has been involved in terrorism.

Patrik became a Swedish teacher for his contact in the London Forum, and from those initial encounters, he was quickly ushered into the larger world of the far right.

Hear more

Addressing the supremacists

"Some people think it's the fear that's the hardest thing, but it's quite seldom that you are actually afraid," he says. "It's the stress you have to live with constantly. You have two phones. You have two lives and you can't combine them in any way."

The people in the far-right groups he interacted with ranged in their theories, from those who openly talked about rivers of blood, genocide and glorifying Hitler, to what he called "lighter versions" - "those people that see violence as necessary but not something that they necessarily think is good."

"There are a lot of variations."

He was invited to meet groups in the US and ended up at a barbecue with far-right extremists. He was even invited to speak at an event.

"I was in that difficult situation of how do I address 100 white supremacists in a way that I can feel OK with?" he recalls.

"I spoke in very general terms of how the left is oppressing the right and how they are infiltrating the right," he says. "It was quite ironic.. I just played on this idea of the right being victims."

Image copyright Hope Not Hate Image caption A march in Charlottesville which Patrik Hermansson participated in while undercover

Then came the events in Charlottesville.

"I have never been so angry in my life," Patrik says.

"Over the last year I had listened to these violent ideas, violent speeches, calls to action and lots of people, including myself, downplayed that," he says. "They say 'yes, these people speak very violently, and they have violent ideas, but they will not act on them.'

"But you realise after a while that there are so many of them and although most of them are not going to act on these ideas.. There are always going to be a few that are crazy, and the logical end to this way of thinking is exactly what happened in Charlottesville."

Image copyright Getty Images Image caption Violence flared in Charlottesville over the removal of a statue of a Confederate US Civil War leader

In a recent report, the extremism monitoring group, the Southern Poverty Law Centre attributed more than 40 killings and more than 100 injuries to people involved in the alt-right, with most of the violence occurring in 2017.

Patrik ended his time in the alt-right a little over a month after the violence in Charlottesville. An account of what he had witnessed while undercover, was published by the New York Times. Predictably, the revelations prompted a backlash from the people who once trusted him.

"Since I had been to so many different groups and I had been referred to by lots of different people, people start suspecting each other - rightfully," he says. "They started writing apology letters and blog posts and saying that I wasn't really very deep and all these defence mechanisms that anybody would apply in a similar situation.

"To me, [they sent personal] threats. Because they knew I had been deep inside. I spoke at their forums and I vetted their new members."

Image copyright Getty Images Image caption Vigils were held in honour of Heather Heyer, who was killed in Charlottesville

Patrik still works as a researcher for Hope Not Hate and says its "comforting" to look from a distance at the people he once studied up close and undercover.

"I learned a lot," he says. "I'm more motivated and my time undercover was useful in what I do now."

Do you have a story? Email BBC Trending.

More from Trending: How much to fake a trend? In one country, about £150

A BBC investigation has found that companies in Saudi Arabia are offering to boost hashtags onto local versions of Twitter's "Trending Topics" list - artificially promoting their visibility on the social network using automated accounts.READ NOW

You can follow BBC Trending on Twitter @BBCtrending, and find us on Facebook. All our stories are at bbc.com/trending.