It’s one of the most influential and radical counterculture movements in modern history, and Brian Welsh’s Beats is the latest feature film to chronicle rave in early-1990s Britain.

Rave emerged from the smiley-faced, Ibiza-inspired acid-house scene of the late-1980s, and saw young people – in their hundreds, thousands and tens of thousands – gathering for free in outdoor spaces, like fields, woodland and beaches, dancing the night away to electronic music – Chicago house, Detroit techno, breakbeat rave – built for dancefloors.

To escape the police, raves were closely guarded secrets, with locations revealed on the night through word of mouth, pirate radio stations or by calling a telephone number and picking up a recorded message. In a world before smartphones, GPS and Google Maps, it meant jumping in a car, getting lost, and then picking up the scent by following cars that looked like they were going to a rave.

I felt a spiritual connection to their journey – Brian Welsh

Although Beats captures the thrills and spills of rave-hunting, it isn’t so much a film about rave as a big-hearted coming-of-age movie focusing on teenage pals: timid and awkward Johnno (Cristian Ortega) and bolshy tearaway, Spanner (Lorn Macdonald), in central Scotland in 1994 as the sun set on the rave era. The unlikely friends share a passion for exhilarating, new electronic music, which is captured in the soundtrack crafted by Scottish DJ Keith McIvor, better known by his stage name JD Twitch (Optimo), which features defining rave anthems including The Prodigy’s Everybody In the Place and Wind It Up, Joey Beltram’s Energy Flash and Human Resource’s Dominator.

In the mid 1990s, Beats’ director Brian Welsh was a teenager growing up in Aberdeen, Scotland, discovering electronic music and experiencing “the fag end of the rave scene” at beach and forest parties. He sees himself in Johnno and Spanner: “The film’s based on a play, Beats, by Kieran Hurley, and when I saw it in 2012 I was blown away by Johnno and Spanner going to a party for the night of their lives in the hills of central Scotland – I felt a spiritual connection to their journey,” he tells BBC Culture.

“The political and social context of the time feels really significant too with the Criminal Justice Bill attacking civil liberties under the guise of clamping down on rave, the end of Thatcherism and the rise of Tony Blair’s New Labour, and ideas around individualism. Society changed dramatically and those changes are relevant today – the Criminal Justice Act was used against Extinction Rebellion, and in 2003 to criminalise busloads of people protesting against the Iraq war,” continues Welsh. 

24-hour party people

Considering the rave scene was the big bang for electronic music club culture in the 1990s, and went on to shape the superclub and superstar DJ era, the emergence of EDM as a global youth culture in the late noughties, and a festival industry that in the UK is estimated to be worth £2 billion ($2.6 billion) annually, it’s surprising rave hasn’t inspired more films.

Human Traffic covers 1990s club culture, Michael Winterbottom’s 24 Hour Party People is centred on ‘Madchester’ and Factory Records, and It’s All Gone Pete Tong is about a jet-setting superstar DJ with an Ibiza residency. Welsh mentions 24 Hour Party People and Quadrophenia as informing Beats, but found inspiration in coming-of-age films such as Dazed and Confused, buddy movies including Superbad and Thelma and Louise, and films in which electrifying music scenes and subcultures are the backdrop, such as La Haine and Do The Right Thing.

The rave era will be appreciated and understood to be as significant and influential as punk

“Rave hasn’t been documented in film apart from a few documentaries, and it’s such an interesting period because it was a massively important cultural moment. Rave had a DIY aesthetic, it was about groups of people organising free parties and so it was outside of the commercial sphere – that seems like an act of defiance against individualism, profit and privatisation,” explains Welsh.

Kieran Hurley, co-writer of Beats the film, and the writer of the play that inspired the film, believes that in time, the rave era will be appreciated and understood to be as significant and influential as punk. “Rave has not been mythologised in the same way as punk yet; it’s bound to be and deserves to be – we’re going to see more stories about the rave scene in the next 10 years,” he says.

“We were dead keen to tell the story of an incredibly meaningful night for these two boys but, also explore the social and political conditions around that moment – rave is a generation’s reaction against the forced hyper-individualism of the Thatcher era, when a set of values were instilled into society that a lot of young people rejected,” continues Hurley.

The fierce anti-establishment credo of the rave scene plays out in the character D-Man (Ross Mann), the politicised rave pied piper and DJ from pirate radio station Community Service Radio who serves up banging tunes with biting broadsides and social commentary (“they want to privatise our minds”; “the only good system is a sound system”), in the tradition of Jamaican sound-system culture.

“For Johnno and Spanner the rave’s a massive party, but for D-Man it’s a protest, it’s his way of saying we are explicitly opposed to what you want our lives and society to be about. We recognise that you hold us in disdain, and we hold you in equal disdain,” explains Hurley.

Rave to rebel

It’s remarkable to reflect that the government of the day passed laws to stop raves and free parties – the Criminal Justice and Public Order Act 1994 granted police “powers to remove persons attending or preparing for a rave’ and to stop a ‘gathering on land in the open air of 20 or more persons at which amplified music is played during the night”.

It was perceived as an attack on electronic dance music, specifically Section 63, with its definition of music as “including sounds wholly or predominantly characterised by the emission of a succession of repetitive beats”. “So many people became politicised by accident because they felt the government and mainstream media were attacking your way of life, so you have a push back against that,” says Hurley.

Rave helped dissolve invisible markers of race and class and united myriad disparate groups

Amid this turbulence, raves offered escapism, hedonism and expression – but dancefloors were also about hope. They operated as liminal spaces, where it was possible to imagine and enact a utopian vision of what society could be. “That’s absolutely what rave dancefloors are about, there’s an egalitarianism, it’s a shared space of mutual respect, difference is welcomed and there’s a celebration of what it is to be alive – that’s very important to everyone from the rave scene,” says Hurley emphatically.

While the 1990s are remembered, musically, as being dominated by Britpop, acid house and rave helped dissolve invisible markers of race and class. It united myriad, disparate groups through a passion for electronic music and dancing in open-minded, recreational spaces that weren’t dominated by alcohol and aggressive masculinity – rave is often credited as a key factor in the decline of football hooliganism.

It’s a sentiment echoed by Welsh who remembers his rave epiphany 25 years ago as if it were yesterday: “It was Dave Clarke DJing on a Wednesday night at a club in Aberdeen, the Pelican – I was still at school and I got such a roasting when I got in the following morning, but I had the night of my life. It was so funky and the energy was electric, there were people from all over the place, different backgrounds, uniting under this one thing. It felt like a safe, different space because I hated school which I found scary and violent.”

While Welsh is old enough to have caught the twilight of rave scene, Hurley is too young to have experienced it. Instead he picked it by osmosis from his older brother. Nevertheless both Welsh and Hurley are passionate electronic music fans steeped in the legends, fables and values of the rave era and are examples of how the spirit of rave lives on and remains relevant today.

“There’s something about young people on a dancefloor that’s not going to die. As long as new scenes are happening, and they absolutely are happening today, the music and the ethos of the time seems to seep into people’s lives in times anew,” says Hurley.

Love film? Join BBC Culture Film Club on Facebook, a community for film fanatics all over the world.

If you would like to comment on this story or anything else you have seen on BBC Culture, head over to our Facebook page or message us on Twitter.

And if you liked this story, sign up for the weekly features newsletter, called “If You Only Read 6 Things This Week”. A handpicked selection of stories from BBC Future, Culture, Capital and Travel, delivered to your inbox every Friday.