Many animals use the sun's polarization pattern to orientate, but the dung beetle Scarabaeus zambesianus is the only animal so far known to orientate using the million times dimmer polarization pattern of the moonlit sky. We demonstrate the relative roles of the moon and the nocturnal polarized-light pattern for orientation. We find that artificially changing the position of the moon, or hiding the moon's disc from the beetle's field of view, generally did not influence its orientation performance. We thus conclude that the moon does not serve as the primary cue for orientation. The effective cue is the polarization pattern formed around the moon, which is more reliable for orientation. Polarization sensitivity ratios in two photoreceptors in the dorsal eye were found to be 7.7 and 12.9, similar to values recorded in diurnal navigators. These results agree with earlier results suggesting that the detection and analysis of polarized skylight is similar in diurnal and nocturnal insects.