At London’s Hammersmith Apollo in the spring of 2001, Kylie Minogue previewed a previously unheard song.

While new material doesn’t always receive quite the same enthusiasm in a live setting as fan favourites – particularly when you have a back catalogue of bangers such as Kylie‘s – this was Can’t Get You Out Of My Head, an instant earworm like nothing she had recorded before, a song that was soon to take on a life of its own.

Rob Davis, former Mud glam-rocker turned acclaimed pop and dance songwriter, was in the crowd to see it performed on stage, before Minogue had even recorded it. “It was really exciting,” he says. “It went down amazingly. It’s quite sing-along, isn’t it, so I think people got the gist quickly. And it’s Kylie, people love her, don’t they?”

The previous year, with three-and-a-half minutes of shiny disco pop helped by a pair of teeny gold hotpants, Minogue had firmly reinstated herself as one of our most beloved music stars, following her mid-90s period experimenting with the still brilliant (Confide In Me remains one of her best) but less commercially friendly Indie Kylie. Spinning Around was glitzy and fun and instantly propelled the singer back to the top of the charts – but if this was Minogue’s “comeback”, we hadn’t seen anything yet.

La la la, la la la la la: 20 years ago, in September 2001, Can’t Get You Out Of My Head was suddenly everywhere. Released first in Australia and the following week in the UK, it spent four weeks at number one over here (one of just two tracks that year to stay for so long, matched only by Atomic Kitten’s Whole Again) and 30 weeks in the Top 40 in total, according to Official Charts.

Another charts fact? It took just over four months to sell a million – compare that with 25 years for her second biggest-selling UK hit, 1989’s loved-up duo with Jason Donovan, Especially For You. Around the world, it is estimated to have sold more than five million copies.

It was a moment in music where the stars aligned: a song we aptly couldn’t get out of our heads; a slick, futuristic video with simple, almost robotic choreography (the start of Kylie’s jerky, face-up-close-to-the-camera moves she became known for around the period of Fever, her eighth album); and another unforgettable outfit in the form of her hooded, slashed-to-the-navel white jumpsuit.

More on Kylie Minogue

Plus of course, the magic of Kylie.

It started in a garage-turned-studio at Davis’s then home in Epsom, Surrey. Davis – who includes Spiller’s huge summer 2000 hit Groovejet (If This Ain’t Love), featuring Sophie Ellis-Bextor, and dance classic Toca’s Miracle, also released in 2000, on his CV – co-wrote the track with Cathy Dennis, another former pop star turned acclaimed songwriter. It was the first time they had ever worked together.

“It was just one of those days where everything worked,” he says. “It was all written as we went, no preconceived ideas or anything. All I started with was a 125 drum loop… and I played a bit of guitar and [Dennis] came in with the ‘I Just Can’t Get You Out Of My Head’ thing straight away. Gradually, we wrote it in sections on the keyboard. With a lot of dance music, you have a whole backing track first. But we didn’t, we gradually wrote it from top to bottom as we went along.”

Eschewing the traditional verse-chorus-verse pattern, Can’t Get You Out Of My Head has an unusual structure. “It’s funny because at the time one of my publishers said to me, ‘where’s the chorus?’ because it comes in with different hooks… this was almost chorus-bridge-chorus. But there’s no rules, really. It’s a good example, Can’t Get You Out Of My Head, that you can go anywhere.”

Davis says he and Dennis had a good feeling about the song, knew that in the right hands it could do very well. “But there’s other songs I’ve been excited about that haven’t done as well,” he says. So he didn’t let himself get too excited.

The song was originally sent to Ellis-Bextor’s team, who reportedly passed, and S Club 7 were said to have been in the running at one point, too. Ellis-Bextor, says Davis, is a friend and “always has a grin” when it comes up; the song that got away.

“I don’t think it could have been as big with anybody else,” he says. “It just worked for her brilliantly.” Minogue’s A&R representative wanted it immediately and, according to a 2012 interview with The Quietus, it took just 20 seconds of hearing the demo for the star herself to be hooked. She went to Davis’s garage studio to record it.

“It was a sweet moment, she was really nice,” says Davis. “She brought her own food – smoked salmon and stuff like that, from a deli – and brought enough for everybody. It was all done in the garage, just me and Cathy producing it. It was done in bits but she’d already learnt it – she’s very pro, Kylie. She’d done it live before, routined it for the [Hammersmith] live gig, which was really cool. So she already knew the song really well.”

Five months after the song’s release, Minogue performed it at the Brits, a mash-up with New Order’s Blue Monday, arriving on stage on a giant Kylie CD. She won the awards for best international female and album, for Fever. At the MTV Europe Music Awards later in 2002, she was named best pop act and best dance act.

“The whole buzz around it was incredible,” says Davis. “It was an amazing time. I think now, it’s considered an iconic song for her.” Davis and Dennis also wrote Come Into My World, another track on Fever, which won a Grammy in 2004.

Can’t Get You Out Of My Head even broke through to the NME Awards and was nominated for best single that year. As Minogue has put it herself, the song “kick-started a whole different phase in my career”. The music has never stopped, with the star releasing her 15th album, Disco, in 2020 – and becoming the first woman to top the UK album chart across five decades.

“Wow. I mean, WOW!!! What a moment in my lifetime,” she said, sharing a clip from the Can’t Get You Out Of My Head video on social media to mark the Australia release earlier this month. “I’ve been singing it ever since!!!”

Haven’t we all?