Johnny Rotten handed out badges, posters and other Sex Pistols-branded goodies. Teens and young children hit the dancefloor with Sid Vicious to boogie to pop hits such as Baccara's Yes Sir, I Can Boogie and (yes, really) Daddy Cool by Boney M. Then Rotten leapt into a giant Christmas cake and the band and audience smeared each other with food.

The Sex Pistols' last UK gig – a benefit for the children of striking firefighters at Ivanhoe's nightclub in Huddersfield on Christmas Day 1977 – remains their most implausible. However, almost 36 years to the day later, this surreal milestone is landing on our screens via Never Mind the Baubles: Xmas '77 With the Pistols, to be shown on BBC4 on Boxing Day at 10pm.

"It's footage I filmed on a big old crappy U-matic low-band camera," explains director Julien Temple, who dodged flying cake and pogoing punks to record the two performances (an afternoon children's matinee and an adult evening show) from 25 December 1977. "But it's right in their face. I'm right up there with them. It's probably the best footage of the Pistols on film but it's never been seen."

Not much of it, anyway. Snippets of Temple's Huddersfield footage have appeared before in his 2000 documentary film The Filth and the Fury, and in a nine-minute short made by West Yorkshire film-maker Peter Spence in 2008. However, this will be the first time anyone has seen the near-mythical show in what Temple calls "its full, unbelievably energetic glory".

As well as documenting what would be the last home stand of one of Britain's most influential groups, Never Mind the Baubles captures a different side of the band. Here are Britain's most notorious punk band putting on daft hats and being kind to children.

As Temple remembers, they arrived in Huddersfield at the height of a moral panic and tabloid frenzy. "To most people they were monsters in the news. But seeing them playing to seven- and eight-year-olds is beautiful. They were a radical band, but there was a lot more heart to that group than people know."

By December 1977, the Pistols were banned from playing almost anywhere in the UK. "They were even banned from Holiday Inns," says the director. "Like Mary and Joseph."

Meanwhile, the firefighters had been on strike for nine weeks and were struggling to feed their children. A benefit gig was ideal for both sides.

"The cake was the size of a car bonnet and had 'Sex Pistols' written on it," policeman Jez Scott, who had been a 16-year-old punk at the gig, said in 2007. "I got a yellow skateboard with pink wheels – like the Never Mind the Bollocks album cover – by winning the pogoing competition. The gig itself was great, very exciting. I remember they played Bodies, but omitted the swear words because of the children."

Earlier this year, Rotten (aka John Lydon, who fronts Public Image Ltd), told the Guardian the gig at Ivanhoe's was "one of the highlights of mine and Sid's career". Two weeks after the gig, the Pistols broke up and shortly afterwards Vicious was dead.

Today, although the old frontage remains, Ivanhoe's is a supermarket. However, Temple promises not just "the last piece of the jigsaw" but a "Pistolian meditation on the subject of Christmas", with interviews with band members and those who were children at the gig.

"It's going back to what was on television that day and what Christmas was like back then. Christmas 1977 is a surreal, strange place to visit.

"In a way, the Pistols seem the only thing that's connected with today. Everything else seems halfway into the Victorian period, whereas the Pistols seem very modern and aware of what's going to happen. Hopefully, there's resonance in the fuel bills and firemen's strikes of today. Even though it's a different planet, people face the same problems.

"The sound with just one camera is raw and searing. I hope kids watching it today will go: 'Fuck me, bands like that just don't exist.'"