When the 22-year-old David Bowie penned Space Oddity, a song that would ultimately become a recognised classic, he was a burgeoning pop artist without a record deal.

A folk singer without a gig, a sometime mime, and a purveyor of ice-creams. His first serious relationship, with the actress Hermione Farthingale, was in free fall.

It was December 1968, and Bowie's manager Kenneth Pitt was collating a promotional film to pimp his client's wares to London television and film producers.

He requested Bowie pen a "special piece of new material" to contemporise the otherwise retrospective nature of the film.

And then, on Christmas Eve, astronaut Bill Anders captured his iconic photograph of Earth from the Apollo 8 spacecraft while circumnavigating the Moon.

The Earthrise image was still resonating in the public's imagination when Bowie retreated to his room in Clareville Grove, London to write his space cabaret.

This photograph, known as Earthrise, was taken by astronaut William Anders during the Apollo 8 mission, which orbited the moon in 1968. ( NASA: Bill Anders )

Composing on a 12-string Hagstrom guitar with a little sonic weirdness from a Stylophone given to him by Marc Bolan, he came up with Space Oddity.

A blatant commercial object, a "pragmatic" turn by a fledgling artist, the song would become an anthem for space exploration for decades (and for TV news obituaries on the occasion of Bowie's death in 2016).

Space travel meets pop culture

Space Oddity tells of an astronaut, Major Tom, launched into space in a manner akin to the Apollo missions.

Yet in this instance all does not go according to plan and he is left adrift in the abyss of space, "floating 'round my tin can, far above the Moon".

At the time it was considered a "novelty song" to hang alongside other opportunists riding the vapor trails of the Saturn V. (Omega watches, Tang, Space Food Sticks etc).

Bowie was acutely aware of the commercialisation of the space exploration story, of course.

"You have really made the grade, and the papers want to know whose shirts you wear," exalts ground control as Tom hurtles towards the heavens.

Eschewing the typical pop-song template, Bowie designed the piece as if it was a dramatic play. "I think I wanted to write a new kind of musical," he reflected in 2002, "and that's how I saw my future at the time."

The song — one of his earliest and perhaps most outrageous musical assemblages — is also indicative of the artist he would become, a restless creative magpie perched by the wireless, plucking phrases and vocal stylings from the inbound radio waves.

The definitive version, recorded in late June 1969 at Trident Studios, was pressed and released as a single within three weeks — on July 11 — to leverage the hype of the impending Apollo moon landing.

It also sealed a new recording deal with Mercury Records. Bowie was back.

Another version of David Bowie's 1969 Space Oddity album cover ( Supplied )

It was first met with scorn

However, his long-time producing partner Tony Visconti refused to work on the song, citing it as a distasteful departure from the singer's hippie folk leanings.

Visconti's unease led him to recommend Gus Dudgeon (who would later work with Elton John) as producer. The song's adventurous orchestration and unsettling harmonics owe much to Dudgeon's ambition.

Through resonance, tone and unexpected harmonic shifts, Bowie and Dudgeon achieved a meta-pop song full of cultural and musical references.

There are lyrical and tonal references to the Bee Gees' New York Mining Disaster 1941 while an acoustic passage signposts Old Friends by Simon & Garfunkel. Even the metallic chimes of the Stylophone recall the pulsating intro of the Beatles' I Am The Walrus.

This was music for space both inside and out, an experimental sonic palette that would open up a whole new genre of musical art direction.

Of course, Kubrick's 2001: A Space Odyssey hangs heavily over proceedings. The two works are not only linked by name, but by their respective critiques of the cultural zeitgeist of "space fever".

A sense of melancholia and detachment permeates Bowie's recording.

Yet, Major Tom's predicament — floating in a tin can far above the world — is perhaps not the perilous event we might suspect.

He seems quite OK with it all. Even his observation that there is "nothing I can do" comes across as somewhat of a relief.

We are never really sure whether the communication breakdown with ground control was accidental or by design. In Norman Mailer's Apollo 11 chronicle Of a Fire on the Moon, he notes that the "obvious pleasure" of the astronaut, "was to be alone in the sky".

After his death in 2016, David Bowie was commemorated with the naming of a lightning-shaped "David Bowie constellation" near Mars. ( Supplied: DDB Brussels )

The real message

Still, in a 1980 interview, Bowie revealed Major Tom's dilemma was a comment on what he saw at the time as the limits of American exceptionalism:

"Here we had the great blast of American technological know-how shoving this guy up into space, but once he gets there, he's not quite sure why he's there. And that's where I left him."

For such a challenging work, the press reaction in Britain to Space Oddity was largely positive. Tony Palmer, writing in the Observer, appreciated the song's cynical air at a time when "we cling pathetically to every moonman's dribbling joke, when we admire unquestioningly the so-called achievement of our helmeted heroes".

Music journalist Penny Valentine's review for the ensuing album, which would feature Space Oddity as the lead track, observed that Bowie had captured "the rather frightening atmosphere we all live in as the backdrop to his songs".

Indeed, come July 1969, the promise of the 60s and the hippy trip of the free love movement were a few festivals and a bunch of ghoulish murders away from coming to an end.

The sense of being adrift like Major Tom was not just a fantasy construction any more.

The song's television debut would be on July 20, when the BBC aired the track during the Apollo broadcast, albeit after the Lunar Module had safely touched down. A scenario that even surprised Bowie — "of course, I was overjoyed that they did".

Buzz Aldrin alongside one of the legs of the Eagle module on the moon during the Apollo 11 mission.

Despite its contrived beginnings, Bowie designed a cultural touchstone for a historic moment of human engineering and blind courage.

Even 50 years hence, he appears to us fully formed on Space Oddity as a moonstruck balladeer and completely in sync with the times.

The immaculately-dressed changeling who would go on to hit the glam-rock jackpot with his alien stage-persona Ziggy Stardust.

A character who captured the abrasive temperament of the moment as he straddled the jet-trails of our collective rushing towards the stars.

Mitch Goodwin researches digital aesthetics, media ecologies and cultures of automation at the University of Melbourne. This article originally appeared on The Conversation.