“Life on Mars?” is an enigmatic song with its origins in chanson—the lengthy, lyric-driven and often melancholy songs of France—and a definite eye on both middle-of-the-road balladry and the latest developments in music in the early 1970s. And for such an opaque fable with a bleak view of the modern world, it has become a remarkably potent musical artifact, spawning not only countless covers, but a TV series and quite a few appearances in movies too.

So, to celebrate David Bowie’s 69th birthday (January 8) and the release of his new album Blackstar, here’s a look at how such a remarkable song came into being.

It all begins with a different song entirely:

The story begins in 1968, with a song written by Claude Francois and Jacques Revaux called “Comme d’habitude.” This had a stirring, descending chord sequence and the opportunity to project some hard-won life lessons, and given that the Francophone songs of Jacques Brel were being interpreted into English and providing hits for Dusty Springfield and Scott Walker, it was felt an English version of the song might do well. Ever the enterprising songsmith, David wrote a lyric (typed up in full here) and sang his version, now called “Even a Fool Learns to Love,” over the record.

However, his version was rejected, and as Paul Anka had bought the rights to it, Bowie couldn’t use it himself either. A year later Frank Sinatra released Paul’s version, to global acclaim, as David recalled on a German TV program: “The next time I heard it, it was ‘My Way’ by Frank Sinatra… I was really pissed off. I thought that should’ve been my song. So I thought, ‘I’ll write my own version.'”

He later added the sleeve-note “inspired by Frankie” to the back cover of Hunky Dory.

The lyric, while far from a straightforward narrative, is essentially the story of a sensitive girl looking to the media to lift her out of her traumatic home life and finding the experience confusing and empty. She hides in a cinema to escape, only to become overwhelmed with despair when she can’t relate to anything happening on the screen. As David himself explained in The Complete David Bowie: “I think she finds herself disappointed with reality… that although she’s living in the doldrums of reality, she’s being told that there’s a far greater life somewhere, and she’s bitterly disappointed that she doesn’t have access to it.”

Although the piano part on the final recording is played by Rick Wakeman (soon to become the Rick Wakeman of Yes fame), the song was written during a protracted spell of songwriting at the piano by David, trying out various chord inversions. This intense focus would yield not only “Life on Mars?” but also “Changes,” as David would later recall on his website: “I played my plodding version and Rick wrote the chords down, then played them with his inimitable touch.”

Reflecting on how insistent the song became in his head while writing it, David told the Mail on Sunday: “This song was so easy. Being young was easy… I took a walk to Beckenham High Street to catch a bus to Lewisham to buy shoes and shirts but couldn’t get the riff out of my head. Jumped off two stops into the ride and more or less loped back to the house up on Southend Road. Workspace was a big empty room with a chaise lounge; a bargain-price art nouveau screen (‘William Morris,’ so I told anyone who asked); a huge overflowing freestanding ashtray and a grand piano. Little else. I started working it out on the piano and had the whole lyric and melody finished by late afternoon. Nice.”

The lyric “now the workers have struck for fame, ‘cos Lennon’s on sale again” is a reference to the 1970 song “Working Class Hero” by John Lennon, which retold Lennon’s own childhood as a product of class conflict. Through the eyes of the skeptical girl, Bowie lightly pokes fun at the idea of a revolutionary pop star, chasing fame through the capitalist system. It’s more of a wry shrug than a withering rebuke. In any case, of all the Beatles, John was the least rooted in the deprivations and rowdy community of working-class Liverpool life, growing up at a slight remove in his Aunt Mimi’s aspirational and spotless semi-detached house.

The startling orchestral arrangement—particularly the spiraling strings tumbling downwards at the end, the cellos stamping about and slowing down for a grand finale not unlike the ending of “Bridge Over Troubled Water” by Simon and Garfunkel—came from guitarist and right-hand man Mick Ronson. But although he may have adopted a more-is-more approach to his orchestra, his inspiration for the lyrical guitar part that appears after each chorus was the stately “Something,” by the Beatles.

If you listen carefully in the second verse, there are two recorders playing a high countermelody, both played by David. This precedes Led Zeppelin’s “Stairway to Heaven,” which came out later that year and also features a recorder ensemble in its quieter moments.

If you’ve ever wondered why the piano part appears to start up again after the string arrangement reaches its triumphant climax, it’s from a previous take that somehow lasted a little longer than the final version, complete with an interruption from a nearby telephone, as producer Ken Scott explained in a lecture to Red Bull Music Academy: “It was a really good take, and suddenly this phone which was in the bathroom at the side of the studio started to ring, and it was picked up on the piano mics which were right by the door of this bathroom, and we had to stop the take.

“Mick Ronson, who happened to be in the studio, was just cursing and swearing like mad because we had to stop it. So we went back to the beginning of the tape, started to record another take again, and I don’t know if they just started earlier, or if they played it faster, or what, but it turned out that we didn’t erase over the complete earlier take. We didn’t even realize it until we did the strings, and they’re just sustaining at the end, nothing else is playing, and then suddenly the piano came back in, and then the phone comes in, and then you hear Rono cursing and swearing.”

The line “Look at those cavemen go” in the chorus is is a reference to the song “Alley Oop”, a one-off hit in 1960 for American doo-wop band the Hollywood Argyles, based on the syndicated comic strip created in 1932 by V. T. Hamlin. The song had been revived by the Beach Boys for their album Beach Boys’ Party! in 1965, and the Bonzo Dog Doo-Dah Band for their second single in 1966.

The dramatic themes and lyric of “Life on Mars” the song make them a perfect match with Life on Mars the TV series, in which all of that dislocation is placed inside the head of Sam Tyler, who wakes up from a car crash to find he’s been transplanted back to the 1970s. Wes Anderson’s movie The Life Aquatic with Steve Zissou features a Portugese version; there’s an a capella version in 2005’s Loverboy; and Jessica Lange sang it in a German accent during the Season 4 premiere of American Horror Story: Freak Show.

Doctor Who paid their own tribute when writer Phil Ford set “Waters of Mars” inside Bowie Base One, and there was even an episode of the British comedy Not Going Out entitled “Life on Mars Bars.”