It has proved to be the most enduring image we have of our fragile world. Over a colourless lunar surface, the Earth hangs like a gaudy Christmas bauble against a deep black background. The planet's blue disc - half in shadow - is streaked with faint traces of white, yellow and brown while its edge is sharply defined. There is no blurring that might be expected from the blanket of oxygen and nitrogen that envelops our planet. Our atmosphere is too thin to be seen clearly from the Moon: a striking reminder - if we ever needed one - of the frailty of the biosphere that sustains life on Earth.

This is Earthrise, photographed by astronaut Bill Anders as he and his fellow Apollo 8 crewmen, Jim Lovell and Frank Borman, orbited the Moon on Christmas Eve, 1968. His shot, taken 40 years ago next month, has become the most influential environmental image, and one of the most reproduced photographs, in history. Arguably, his picture is also the most important legacy of the Apollo space programme. Thanks to this image, humans could see, for the first time, their planet, not as continents or oceans, but as a world that was 'whole and round and beautiful and small,' as the poet Archibald MacLeish put it.

Certainly, Earthrise is a striking reminder of Earth's vulnerability. We may have forgotten the men who risked their lives getting to the Moon and who explored its dead landscape - a 'beat-up' world as they put it - but the view they brought back of that glittering blue hemisphere continues to mesmerise.

'Our planet is a lonely speck in the great enveloping cosmic dark,' the US astronomer, Carl Sagan, noted. 'There is no hint that help will come from elsewhere to save us from ourselves.' The opinion is shared by Sir David Attenborough. 'I clearly remember my first sight [of the Earthrise photograph]. I suddenly realised how isolated and lonely we are on Earth.'

Indeed, says the UK space historian Robert Poole, the first popular expressions of ecological concern can be traced to the publication of that picture: dazzling blue ocean, the jacket of cloud and the relative invisibility of the land and human settlement. 'It is a rebuke to the vanity of humankind,' says Poole. 'Earthrise was an epiphany in space.'

In fact, Nasa [the National Aeronautics and Space Administration] had not intended to fly to the Moon in 1968. Its lunar hardware was still unproven and Apollo 8 was slated merely to test equipment in low Earth orbit. However, that autumn, the agency was told, incorrectly, by the CIA that the Soviet Union was preparing its own manned lunar mission. So the Apollo programme - established to fulfil President John Kennedy's call for a US manned lunar landing by the end of the decade - was accelerated and Apollo 8 designated for a journey to the Moon, though there would no lander to take men to the lunar surface. That would come on later missions.

The decision was controversial. Nasa's giant Saturn V rocket, the only launcher capable of taking men to the Moon, had been bedevilled by flaws and instrument failures on its two test flights. Worse, there had been the fire in 1967 in which three astronauts - Gus Grissom, Ed White and Roger Chaffee - were burned to death during a ground test of an Apollo capsule. Sending Lovell, Anders and Borman in an almost identical spacecraft to the Moon, on an unsafe launcher, was a gamble, to say the least.

As a result, most press conferences in the run-up to the launch were dominated by questions about the risks the astronauts faced and, although the mission turned out to be a success, and surpassed all subsequent Apollo missions for the precision of its flight path and lack of glitches, it was dogged at the start by control-room nerves and tension.

Finally, at 6.31am, on Saturday 21 December, the Saturn V - at 360ft, the tallest, most powerful rocket ever built and for the first time carrying a human crew - blasted Borman, Anders and Lovell into space. The launch was shattering. 'The Earth shakes, cars rattle and vibrations beat in the chest,' as Anne Morrow Lindbergh, the writer and wife of the aviator Charles Lindbergh put it.

In the event, the rocket performed perfectly and put Apollo 8 safely into orbit. Using a 'state-of-the-art' computer - which had less power than a modern hand calculator - Lovell keyed in the commands that fired the launcher's third stage and sent their craft hurtling on its three-day journey to the Moon. The spaceship had become the first manned vehicle to slip the surly bonds of Earth and head to another world.

The outward trip was not without its mishaps. As the astronauts settled down for their first night in space, cramped into a craft the size of a minivan, they found it difficult to sleep. So Borman tried a sleeping pill. This was a mistake. A couple of hours later, he was struck by a fit of vomiting and diarrhoea, a tricky affliction in zero gravity, as Robert Zimmerman recalls in Genesis: The Story of Apollo 8. 'Borman, Lovell and Anders found themselves scrambling about the cabin, trying to capture blobs of faeces and vomit with paper towels. So much for the glamour of space flight.' Certainly, it was an inelegant way to travel to another world.

Early on Christmas Eve, Apollo 8 reached its destination. The astronauts fired the craft's Service Propulsion System (SPS) rocket to slow as it swept past the Moon and the little ship slipped into lunar orbit. For its first three revolutions, the astronauts kept its windows pointing down towards the Moon and frantically filmed the craters and mountains below. Reconnaissance for subsequent Apollo landings was a key task for the mission.

It was not until Apollo 8 was on its fourth orbit that Borman decided to roll the craft away from the Moon and to point its windows towards the horizon in order to get a navigational fix. (The capsule's astronauts still used sextants to guide their craft.) A few minutes later, he spotted a blue-and-white fuzzy blob edging over the horizon. Transcripts of the Apollo 8 mission reveal the astronaut in a rare moment of losing his cool as he realised what he was watching: Earth, then a quarter of million miles away, rising from behind the Moon. 'Oh my God! Look at the picture over there. Here's the Earth coming up,' Borman shouts. This is followed by a flurry of startled responses from Anders and Lovell and a battle - won by Anders - to find a camera to photograph the unfolding scene. His first image is in black-and-white and shows Earth only just peeping over the horizon. A few minutes later, having stuffed a roll of 70mm colour film into his Hasselblad, he takes the photograph of Earthrise that became an icon of 20th-century technological endeavour and ecological awareness.

In this way, humans first recorded their home planet from another world. 'It was,' Borman later recalled, 'the most beautiful, heart-catching sight of my life, one that sent a torrent of nostalgia, of sheer homesickness, surging through me. It was the only thing in space that had any colour to it. Everything else was either black or white. But not the Earth.' Or as Lovell put it, our home world is simply 'a grand oasis'.

Last week, I spoke to Lovell, now a vigorously healthy 80-year-old and owner of the Lovells of Lake Forest restaurant in northern Chicago, where his son, Jay, is chef. An experienced astronaut even before he flew on Apollo 8, he achieved his greatest fame as commander of the ill-fated Apollo 13 mission - which only narrowly survived a fuel-tank explosion en route to the Moon in 1970. (Lovell was played by Tom Hanks in Ron Howard's film, Apollo 13, in 1995.) 'Apollo 8 was a high point for me without a doubt. Apollo 13 was certainly less pleasant. It was touch and go, after all.' Nor does he fail to appreciate the importance of that photograph. 'The predominant colours were white, blue and brown,' he recalled. 'The green of the Earth's grassland and forests is filtered out by the atmosphere and appears as a bluish haze from space.' The effect is to give Earth an added, especially intense blue veneer.

'Bill [Anders] had the camera with colour film and a telephoto lens,' he said. 'That is what makes the picture. Earth is about the size of a thumbnail when seen with the naked eye from the Moon. The telephoto lens makes it seem bigger and gives the picture that special quality.' (Seven months later, Neil Armstrong - standing on the lunar surface - also noted he could blot out the Earth with his thumb . Did that make him feel really big, he was asked years later? 'No,' the great astronaut replied, 'it made me feel really, really small.')

By Christmas Day, the whole world had become engrossed in Apollo 8's epic journey: 1968 had been a particularly traumatic year and the planet was desperate for a diversion. In the US, Robert Kennedy and Martin Luther King had been assassinated, the Vietnam War had worsened dramatically and civil and student conflict was spreading through US cities. In Europe, the Prague 'spring' had been crushed by Soviet tanks. People needed cheer and the realisation that humans had reached the Moon provided that uplift perfectly.

There was a further twist to the mission's timing. Stanley Kubrick and Arthur C Clarke's visionary epic 2001: A Space Odyssey was then showing in cinemas round the globe. (The Apollo 8 crew had attended its Houston premiere three months earlier.) The film ends with the embryonic Star Child hanging in space above the Earth: a tiny, glittering blue disc very like the one that had just been pictured by Anders. The links between Apollo 8 and 2001 went further than that, however. The film depicts space travel as commonplace and there, to prove the accuracy of its vision, were men orbiting the Moon. It seemed to many people - including myself, then a university student and a space-programme devotee - that all those dreams of science fiction writers and film-makers might soon be realised. It was a wondrous Christmas.

Indeed, it can be fairly claimed that Apollo 8 was the real Man on the Moon story. By the time, Armstrong and Buzz Aldrin reached the Moon on Apollo 11, the world had already got used to the idea of manned lunar flight. By contrast, Apollo 8 took many people unawares. Certainly, you could easily argue that it, and not Apollo 11, deserves the title of the greatest event of the 20th century. Lovell believes that. 'I sat beside Charles Lindbergh at the launch of Apollo 11. "It's a great event," he said, "but you know you were the ones who really spearheaded the moon programme".'

Anders, Borman and Lovell orbited the Moon 10 times. Then, as they prepared to head back to Earth, the astronauts held a last televised press conference. Each then took turns to read out the first 10 verses of the book of Genesis as they skimmed, at a height of 70 miles, over the lunar surface. The Old Testament struck many people as an odd choice for a final lunar reading. But all three (at the time, at least) were deeply religious: Borman and Lovell were Protestants, Anders a Catholic. None of them saw any ambiguity in reading out a version of creation that was at complete odds with the version supported by the scientists who had got them there. In any case, the reading went down well in America.

A few hours later, Lovell fired the SPS engine again and Apollo 8 began its homeward journey, splashing down in the Pacific on 27 December. As the astronauts waited to be picked up by the navy, 10ft waves pounded their craft. Borman, once again, was sick. Apart from that, their homecoming was a triumph.

After that, Anders' colour film was processed and passed to the media. Time ran the photograph with single word 'Dawn' while Life published a lengthy display of images from the mission, including a poster-sized spread of the Earthrise photograph.

Seven months later, Apollo 11 reached the lunar surface. It was the beginning of the end for space programme. Three years later, Apollo 17 lifted off from the Moon, the last human visit to this dead world. The US public, who had funded the programme, tired of the Moon and turned to concerns closer to home. 'Looking back, it is possible to see that Earthrise marked the tipping point, the moment when the sense of the space age flipped from what it means for space to what it meant for Earth,' says Robert Poole in his recent book Earthrise: How Man First Saw the Earth

Humans had spent billions in an attempt to explore another world and in the end rediscovered their own. It was a point stressed by Apollo 17 astronaut Harrison Schmitt, one of the last men on the Moon. 'Like our childhood home, we really see the Earth only as we prepare to leave it,' he wrote.

However, of all the efforts to sum up the story of Earthrise, the best is made by TS Eliot in last of the Quartets:

'We shall not cease from exploration

And the end of all our exploring

Will be to arrive where we started

And know the place for the first time.'

• Additional research by Hermione Hoby

Fly me to the moon: The three astronauts who made history

Jim Lovell

Apollo 8 pilot (later commander of Apollo 13)

Like his Apollo 8 companions, Jim Lovell came from a modest background. He was born on 25 March, 1928, the son of a Philadelphia coal furnace salesman who died when Lovell was 12. As a result, Lovell had to rely on a US navy scholarship to see him through university. He served in the Korean War before becoming a navy test pilot and then a Nasa astronaut in 1962. He flew on two Gemini missions before Apollo 8. Of its three crewmen, Lovell was the only one to return to space - as commander of Apollo 13. Thus he became one of only three men to travel twice to the Moon. Gene Cernan (on Apollos 10 and 17) and John Young (on Apollos 10 and 16) are the others. However, of this trio, Lovell was the only one who never made it to the surface. Although he was scheduled to land with Apollo 13, a fuel tank explosion forced its crew to abandon their landing and to struggle back to Earth. Today, Lovell helps run the Lovells of Lake Forest restaurant near Chicago, where his son, Jay, is chef, and raises money to help young students study science and become involved in the US space programme.

Bill Anders

Apollo 8 pilot

The son of a US nvay lieutenant, Anders was born in October 1933 and grew up in San Diego, California, before becoming a jet pilot, joining the Apollo programme in 1963. Apollo 8 was his only space mission, though he can claim to have made as great an impact as any other seasoned space traveller on that trip: his image of Earthrise has become the environmentalists' icon. The mission affected him profoundly. Once a devout Catholic, he found his experience of space made a mockery of his beliefs and he gave up religion. Anders served in a number of senior US government offices before becoming CEO of General Dynamics. He retired in 1994.

Frank Borman

Apollo 8 commander

Born on 14 March 1928, Borman was brought up in Tucson, Arizona, and after graduating from West Point, served as a fighter pilot before becoming a US air force test pilot and then an astronaut in 1962. After Apollo 8, Borman left Nasa, joined Eastern Air Lines and eventually became its CEO in December 1975. Borman retired from the airline in 1986. He now lives in Las Cruces, New Mexico, where he rebuilds and flies Second World War and Korean War aircraft.