Context. In atmospheres of magnetic main-sequence stars, the diffusion of chemical elements leads to a number of observed anomalies, such as abundance spots across the stellar surface. Aims. The aim of this study was to derive a detailed picture of the surface abundance distribution of the magnetic chemically peculiar star HD 3980. Methods. Based on high-resolution, phase-resolved spectroscopic observations of the magnetic A-type star HD 3980, the inhomogeneous surface distribution of 13 chemical elements (Li, O, Si, Ca, Cr, Mn, Fe, La, Ce, Pr, Nd, Eu, and Gd) has been reconstructed. The INVERS12 code was used to invert the rotational variability in line profiles to elemental surface distributions. Results. Assuming a centered, dominantly dipolar magnetic field configuration, we find that Li, O, Mg, Pr, and Nd are mainly concentrated in the area of the magnetic poles and depleted in the regions around the magnetic equator. The high abundance spots of Si, La, Ce, Eu, and Gd are located between the magnetic poles and the magnetic equator. Except for La, which is clearly depleted in the area of the magnetic poles, no obvious correlation with the magnetic field has been found for these elements otherwise. Ca, Cr, and Fe appear enhanced along the rotational equator and the area around the magnetic poles. The intersection between the magnetic and the rotational equator constitutes an exception, especially for Ca and Cr, which are depleted in that region. Conclusions. No obvious correlation between the theoretically predicted abundance patterns and those determined in this study could be found. This can be attributed to a lack of up-to-date theoretical models, especially for rare earth elements.