In the early 1960's NASA produced and flew a series of Ranger spacecraft to study the moon. These missions, which were the first American spacecraft to land on the moon, helped lay the groundwork for the Apollo program.
Ranger 7 took this first image of the Moon by a U.S. spacecraft, on 31 July 1964 at 13:09 UT (9:09 AM EDT) about 17 minutes before impacting the lunar surface.
The Ranger series of spacecraft were designed to take high-quality pictures of the Moon and transmit them back to Earth in real time. The images were to be used for scientific study, as well as selecting landing sites for the Apollo Moon missions.
All the Ranger spacecraft were designed to head straight into the Moon and send close-range images back to Earth right up until they crashed into the surface. The cameras onboard each spacecraft were designed to provide different exposure times, fields of view, lenses, and scan rates, and they were arranged in two separate self-contained chains, each with its own power supply, timer, and transmitter.
After a frustrating series of malfunctions (these were the early days of space exploration), Rangers 7, 8 and 9 were successful. The images they sent back were 1000 times better than what could be made by Earth-based telescopes.