Surveyor 5 nearly did not land at all. On the way to the Moon a helium valve failed to seal and the pressurisation gas for the vernier engines began leaking away — the propellant system would be unusable long before the descent, and the mission looked lost while the spacecraft was still in transit.
What followed was an improvised rescue conducted in about a day. Engineers rewrote the descent profile completely, firing the main retro-rocket much lower and later than planned so that the crippled vernier system had less work to do and less time to fail, and uploaded the new sequence. It worked, and the spacecraft settled into a small crater in the Sea of Tranquility in September 1967.
It carried the first instrument capable of measuring the chemistry of another world's surface: an alpha-scattering device that bombarded the soil with particles from a radioactive source and read the energies scattered back. Over several days it determined that the lunar soil was broadly basaltic — chemically similar to volcanic rock on Earth.
That single result settled a long argument. The maria had been variously proposed as lava plains, dust seas or sedimentary deposits, and this measurement established them as volcanic, made of material that had once been molten. It was confirmed two years later when Apollo 11 landed roughly 25 kilometres away and brought samples home.
The spacecraft also fired its own vernier engines briefly while sitting on the surface, to see what a rocket exhaust would do to the soil — useful for Apollo, since a lunar module would arrive under power. It survived two lunar nights and operated intermittently into December.