Paul McCartney has admitted he didn't realise he'd fired up a Nirvana reunion until he, Dave Grohl, Krist Novoselic and Pat Smear had been jamming for more than an hour.

The former Beatle had been invited by Grohl to make music for his 2013 movie Sound City, but couldn't decide what to contribute when he arrived for the recording session.

McCartney tells Radio.com: "Dave said, ‘Should we do an old rock'n'roll song?’ A couple of the ones he mentioned I’d done with the Beatles. I said, ‘I don’t want to try to top those.’

"I started kicking around and Dave jumped in on drums – there was no way there wasn’t going to be any chemistry. Then Krist and Pat started playing alongside us, and we suddenly had a big thing going. It was all over in about three hours. All of us had a complete blast."

The revelation that he was playing with the surviving members of Kurt Cobain's band only hit him midway through. "I didn't know I was in a Nirvana reunion," he says. "It was only when I heard them talking, 'Hey, we hadn't this in 20 years or something.' I'm going, 'What are you talking about, guys?' 'Well, you know, we're Nirvana.' I must admit I didn't even know. I said, 'Okay, that's pretty cool.'"

The result of the jam was their track Cut Me Some Slack, which went on to win a Grammy. Nirvana were last month inducted into the Rock And Roll Hall Of Fame, with Cobain's widow Courtney Love appeared to end her feud with Grohl by hugging him on stage.

Meanwhile, McCartney says he wishes more people would ask him about his glory days with the Beatles. "It's like talking about your college days," he says. "People think sometimes, 'I don't want to bore you; I don't want to ask you a Beatles question.' I say, 'No, it's okay.'

"I could be at a dinner party and everyone is telling their stories and I'm thinking, 'It would be good if they asked me a Beatles question – I've got a few stories there.'"