Context. One of the keys to understanding the origin of the Ap stars and their significance in the general context of stellar astrophysics is the consideration of the most extreme properties displayed by some of them. In that context, HD 965 is particularly interesting, as it combines some of the most pronounced chemical peculiarities with one of the longest rotation periods known. Aims. We characterise the variations of the magnetic field of the Ap star HD 965 and derive constraints about its structure. Methods. We combine published measurements of the mean longitudinal field <Bz> of HD 965 with new determinations of this field moment from circular spectropolarimetry obtained at the 6-m telescope BTA of the Special Astrophysical Observatory of the Russian Academy of Sciences. For the mean magnetic field modulus <B>, literature data are complemented by the analysis of ESO archive spectra. Results. We present the first determination of the rotation period of HD 965, P = (16.5+/-0.5) y. HD 965 is only the third Ap star with a period longer than 10 years for which magnetic field measurements have been obtained over more than a full cycle. The variation curve of <Bz> is well approximated by a cosine wave. <B> does not show any significant variation. The observed behaviour of these field moments is well represented by a simple model consisting of the superposition of collinear dipole, quadrupole and octupole. The distribution of neodymium over the surface of HD 965 is highly non-uniform. The element appears concentrated around the magnetic poles, especially the negative one. Conclusions. The shape of the longitudinal magnetic variation curve of HD 965 indicates that its magnetic field is essentially symmetric about an axis passing through the centre of the star. Overall, as far as its magnetic field is concerned, HD 965 appears similar to the bulk of the long-period Ap stars.