The Apollo 11 launch date had arrived with just months to spare: Nine years earlier, U.S. President John F. Kennedy had said that by the end of the decade the country would put a man on the moon and return him safely to Earth.

The successful Apollo 11 moon landing on July 20, 1969, ushered in an era of moon exploration that has so far gone unrivaled.

Things came to a head in April 1961, when the Soviets sent the first human to space. Russian cosmonaut Yuri Gagarin made a 108-minute suborbital flight in a Vostok 1 spacecraft and returned safely to Earth.

A month later Alan Shepherd became the first American in space with his suborbital flight aboard the Freedom 7 spacecraft.

From there the two countries started upping the ante by increasing the number of orbits per flight. Meanwhile Kennedy's moon directive had signaled a change in tactics for the U.S.

Swallowed by Moondust?

At first a moon-landing mission probably raised a lot of eyebrows at NASA—particularly among the astronaut candidates.

"Atlas rockets [which launched spacecraft] were blowing up every day at Cape Canaveral" in Florida, recalled Apollo 13 astronaut Jim Lovell in the 2007 documentary In the Shadow of the Moon.

Shortly after Kennedy's speech, an intensive effort got under way to prepare humans for a moon landing.

In January 1963 Neil Armstrong and four other Apollo astronauts took a field trip to Arizona's Meteor Crater and Sunset Crater, a dormant volcano. Geologists then briefed the astronauts on how those Earthly landscapes were similar to what they might encounter on the moon.

In the years that followed, Apollo crew also toured the Grand Canyon and spent time testing lunar rovers at Bonito Crater northeast of Flagstaff, where the rough, rocky surface mimicked what some geologists thought would exist on the moon.

Geologists flew over Sunset Crater and other landforms in Cessna 182s, taking aerial photos so the astronauts might better understand the lunar geology they were likely to see.

The Apollo moon-landing program carried an optimistic moniker: It was named for the son of Zeus in Greek mythology, often known as the god of light and the sun.

But the first mission almost brought U.S. moon-landing efforts to an abrupt end.

On January 27, 1967, a flash fire occurred in the Apollo 1 command module during a launch simulation, killing the three astronauts meant to pilot the mission.

"I wasn't sure if we were burying the entire Apollo program or three of our buddies," Apollo astronaut Gene Cernan said in In the Shadow of the Moon.

Following an exhaustive investigation into the accident, NASA issued a report in April 1967 that called for major overhauls of the Apollo hardware, launch procedures, and quality control.

The program swung back into gear, and by early 1969, Apollo 10 astronauts Alan Shepard and Donald "Deke" Slayton were cruising over the lunar surface—and grudgingly holding back from diving down for a landing—as they scoped out the Sea of Tranquility, the chosen landing spot for Apollo 11.

"Neil didn't like what we were heading toward, and we selected a safer spot alongside a crater with boulders in it. We landed with a little less fuel than we would have liked to have had, maybe 20 seconds of fuel left."

Aldrin insists that he felt no real fear about landing on the moon.

Nevertheless, he said, "we kind of practiced liftoff [for] the first two hours. We both felt that was the most prudent thing to do after touching down, was to prepare to depart if we had to."

Finally, with half a billion people watching on televisions across the world, the astronauts emerged from the Eagle to spend another two hours exploring the lunar surface.

The pair planted an American flag and placed mementos for fallen peers.

Armstrong uttered his famous first words, reportedly unscripted: "That's one small step for man, one giant leap for mankind."

Armstrong and Aldrin logged 21 hours on the moon—spending the last and longest portion of it trying to sleep in the frigid lander. Then they lifted off to rendezvous with Collins and Columbia for the return voyage.

The crew splashed down in the Pacific Ocean on July 24, 1969—and they were immediately put into a three-week quarantine.

As for their craft, the ascent stage of the Eagle was jettisoned into lunar orbit. Within a couple of years the lander smashed unseen into the moon. Columbia now sits on display at the National Air and Space Museum in Washington, D.C.

To Infinity, and Beyond

After 40 years, Aldrin's impressions of the moon are as fresh today as the day he landed.

"What fascinated me was the lifelessness off it," he said. "That had not changed in hundreds of thousands of years. Generations of humanity had emerged from the trees, and the moon had looked the same way."

Aldrin also remains passionate about what the Apollo 11 mission meant for the world, and what it can still teach humanity.

Today he advocates the U.S. setting its sights higher than it did 40 years ago, "accepting the role of leading other nations to achieve what we did."

"We do have this wonderful opportunity to emerge from whatever troubles us now," he said, "with a very optimistic pathway for the future."