We present the discovery of a long-period, rapidly oscillating Ap (roAp) star, HD 177765. Using high-resolution time-series observations obtained with the Ultraviolet and Visual Echelle Spectrograph at the European Southern Observatory Very Large Telescope, we found radial velocity variations with amplitudes 7–150 m s−1 and a period of 23.6 min, exceeding that of any previously known roAp star. The largest pulsation amplitudes are observed for Eu iii, Ce iii and for the narrow core of Hα. We derived the atmospheric parameters and chemical composition of HD 177765, showing this star to be similar to other long-period roAp stars. Comparison with theoretical pulsational models indicates an advanced evolutionary state for HD 177765. Abundance analyses of this and other roAp stars suggest a systematic variation with age of the rare-earth line anomalies seen in cool Ap stars.