Arthur C. Clarke, laying out the argument in the Journal of the British Interplanetary Society in 1946, quoted a Chinese philosopher who said that the search for knowledge was a form of play. “Very well,” Clarke wrote. “We want to play with spaceships.”

The play paid off. Had we not left our little bubble of air and gravity, we would never have seen “Spaceship Earth” from space, or achieved the environmental awakening that followed. Moreover, the Apollo program amounted to a decade of forced innovation that helped fertilize fields of technology and business, including Silicon Valley, that barely existed before, and convinced a generation of baby boomers that outer space would be part of their heritage. And, not least, it returned 842 pounds of moon rocks, which provided a diary of the birth of the solar system.

But it was not science, cosmic destiny or any great public yearning that put humans on the moon — it was Cold War politics. The Soviet Union’s surprise launch in 1957 of the first satellite, Sputnik, alarmed Americans, who suddenly feared that the beeps in the sky could become bombs, and transformed the Cold War into a technological competition. President John F. Kennedy, who had run for the White House in 1960 on what turned out to be a nonexistent “missile gap” between the United States and the Soviets, felt he had no choice but to accept the challenge. In 1961, about a month after the failed Bay of Pigs invasion of Cuba, which began just five days after the Soviet cosmonaut Yuri Gagarin became the first man in space, Kennedy announced that America should undertake to put a man on the moon by the end of the decade.

[Sign up to get reminders for space and astronomy events on your calendar.]

His idea was met with a lukewarm reception at best. “Anybody who would spend $40 billion in a race to the moon for national prestige is nuts,” Kennedy’s predecessor, Dwight D. Eisenhower, said. (The final bill, as reported to Congress in 1973, was $25.4 billion, or roughly $150 billion today .) Scientists opposed a crash program to land on the moon, arguing that more money should be devoted to robotic exploration.

The public was no more enthusiastic. A 1966 poll asked Americans which government programs could be cut if necessary; 48 percent said the space program. Another poll asked respondents to rank government programs according to their importance; Apollo came in second to last, outranking only federal support for artists and the arts.

The 1960s were among the most tumultuous decades in recent American history. The placement of Soviet missile bases in Cuba almost led to a nuclear war. President Kennedy, his brother Robert F. Kennedy, the Rev. Dr. Martin Luther King and Malcolm X were assassinated, an unpopular war was underway in Vietnam and demonstrations and riots racked the nation’s cities.

A partial accounting of the events of 1969 alone would include the Manson family’s murder of Sharon Tate and others, riots in Greenwich Village after the police raided a gay bar called the Stonewall Inn that have come to signify the beginning of the modern gay rights movement, and the waging of a war against the government by the Weather Underground, a militant offshoot of Students for a Democratic Society.