Some people thought it was about heroin because “Fixing a Hole” was junkie slang for injecting smack. With all the other perceived drug references on the LP (LSD on “Lucy in the Sky With Diamonds” and “I’d love to turn you on” on “A Day in the Life”), why not a song about heroin? Other people thought the song was to be taken literally. Knowing that Paul McCartney had purchased a Scottish farm in 1966, they thought he penned a tune about mending the farmhouse roof.

Neither was correct. As it turns out, the heroin theorists were closer to being right. Decades after Sgt. Pepper was released, McCartney revealed that the song was an “ode to pot.” It was actually the Beatle bassist’s second song in that vein, following the marijuana tribute “Got to Get You Into My Life” on Revolver. He used the analogy of fixing something to represent how pot had opened his mind.

“‘Fixing a Hole’ was about all those pissy people who told you, ‘Don’t daydream, don’t do this, don’t do that.’ It seemed to me that that was all wrong and that it was now time to fix all of that,” McCartney said in Many Years From Now. “Mending was my meaning. Wanting to be free enough to let my mind wander, let myself be artistic, let myself not sneer at avant-garde things.”

It’s not known precisely when McCartney wrote “Fixing a Hole,” although according to the diary of Beatles road manager Mal Evans, it was probably in late January 1967, a couple of months after the band had started work on its new album. Evans wrote about assisting his buddy in the writing of both this song and the title track to Sgt. Pepper, which were crafted around the same time. As with “Sgt. Pepper,” McCartney indicated that Evans would get songwriting credit on the LP, but later changed course to preserve the Lennon/McCartney brand. (Although it is thought that Evans received royalties for his contribution as a silent partner.)

McCartney wasn’t just extolling the virtues of pot on “Fixing a Hole,” but taking a shot at his fans. No, not all Beatle fanatics – just the obsessives who would set up camp outside McCartney’s home and hope to be let inside. The lines on the song’s bridge, “See the people standing there / Who disagree and never win / And wonder why they don’t get in my door,” refer to those folks – although the songwriter claimed that he tried to be hospitable and actually sometimes had let them inside to greet them.

One person that McCartney did let past his door was a man who appeared at the house, claiming he was Jesus Christ. The Beatle said he would always answer the door when he was home and would decide whether or not to let the visitors in depending on how interesting they seemed. “Jesus” made the cut.

“This guy said, ‘I’m Jesus Christ.’ I said, ‘Oop,’ slightly shocked,” McCartney recalled. “I said, ‘Well, you’d better come in then.’ I thought, ‘Well, it probably isn’t. But if he is, I’m not going to be the one to turn him away.’ So I gave him a cup of tea and we just chatted. … So I said, ‘I’ve got to go to a session but if you promise to be very quiet and just sit in a corner, you can come.’ So he did, he came to the session and he did sit very quietly and I never saw him after that. I introduced him to the guys. They said, ‘Who’s this?’ I said, ‘He’s Jesus Christ.’ We had a bit of a giggle over that.”

With “Jesus” in tow, McCartney went to the session to record “Fixing a Hole” on Feb. 9. But he didn’t head to the usual place. EMI’s London Studios (aka “Abbey Road”) were fully booked on that day and even a band as big as the Beatles – who had never before used another British studio – couldn’t get in. Eager to continue work on the new material, the lads headed to the smaller Regent Sound Studios, where the Rolling Stones had made some of their first recordings. Because George Martin was a freelance producer, he could travel offsite with the band, but they had to leave EMI engineers Geoff Emerick and Richard Lush behind. The situation didn’t sit well with them, because they had worked on everything for Sgt. Pepper up to that point. Regent Sound’s head engineer Adrian Ibbetson took over.

Rehearsals and then recording commenced for “Fixing a Hole,” which McCartney had pretty well worked out, with its minor key verses and major key bridges. The song would have a prominent harpsichord part and propel itself on the back of a loping bass guitar. Because McCartney felt it was important that he contributed the bass foundation to the recording, producer Martin sat in on harpsichord – which gives “Fixing a Hole” its distinctive, mannered intro and can be heard throughout the tune.

“Paul had to play bass guitar on it, because nobody could (or can) play that instrument quite like him,” Martin recalled in the book Summer of Love: The Making of Sgt. Pepper. “That meant someone else was going to have to play keyboards. This was unusual, because Paul always liked to play his own keyboards on his own compositions. The part of honorary stand-in keyboard player to the greatest group in the world was offered to me.”

Ringo Starr played drums (laying down the song’s swinging 4/4 rhythm), John Lennon was on acoustic guitar and George Harrison played lead electric. In three takes, the Beatles felt they had what they needed. Harrison then added an overdubbed guitar solo with his Fender Stratocaster, Lennon and Harrison (maybe McCartney too) recorded backing vocals and either Lennon or Starr added maracas to the track.

Nearly two weeks later at EMI, on Feb. 21, the band set out to finish the recording. Perhaps because of Emerick and Lush’s concerns that the takes were of sub-par sonic quality (due to being recorded at Regent Sound), the Beatles attempted another full take, but then decided that the original version that they had begun to overdub was still superior – although not perfect, as McCartney had made a small mistake in his bass part during the third verse and Starr had missed a transition.

Still, McCartney finalized the piece by wiping his original vocals and Lennon’s acoustic guitar part, then replacing them with a new vocal take, which he then double-tracked in parts to strengthen.

In less than two full sessions, “Fixing a Hole” was whole – something that couldn’t be said for much of the Sgt. Pepper material. The song remains one of the simpler tracks on the LP, released on June 1, 1967, less festooned with sound effects, baroque instrumentation or epic concepts. Years later, McCartney would occasionally trot out the tune on his tours, sometimes as a solo piano piece.

Watch Paul McCartney Perform 'Fixing a Hole'

“Paul knew exactly where he was going with ‘Fixing a Hole’,” wrote Martin. “As a result, it was one of the fastest tracks we recorded, in an album of 13 songs that took some five months to complete. … It’s a very simply constructed song…”

Maybe having “Jesus Christ” at the session was helpful to its speedy completion.