Abstract--A gamma-ray spectrometer (GRS) has been built and delivered to the MESSENGER spacecraft which launched on August 3, 2004, from Cape Canaveral, Florida. The GRS, a part of seven scientific instruments on board MESSENGER, is based on a coaxial high-purity germanium detector. Gamma-ray detectors based on germanium have the advantage of providing excellent energy resolution, which is critical to achieving the science goals of the mission. However, germanium has the disadvantage that it must operated at cryogenic temperatures (typically ~80 K). This requirement is easy to satisfy in the laboratory but difficult near Mercury, which has an extremely hot thermal radiation environment. To cool the detector, a Stirling cycle mechanical cooler is employed. In addition, radiation and conduction techniques are used to reduce the GRS heat load. Before delivering the flight sensor, a complete thermal prototype was built and tested. The results of these tests, including thermal design, radiative and conductive heat loads, and cooler performance, are described.