The luminescence properties of semiconducting zinc oxide doped with neodymium, erbium, europium and dysprosium have been investigated. The photoluminescence spectra show the typical emission of zinc oxide in which the rare earth put its fingerprint; no emission of the rare earth could be observed when exciting (lambda < 385 nm) the semiconducting substrate. The electroluminescence spectra are drastically different, depending on the mode of excitation: under forward polarization, when the electrolyte contains a redox couple capable of injecting holes into the valence band, the luminescence of ZnO is observed with only a slight absorption by the rare earth, indicating that the emission occurs near the interface between ZnO and the electrolyte. On the other hand, under reverse bias, the electroluminescence which results from an impact excitation process displays the typical radiative transitions between the shielded 4f levels of the Er3+, Eu3+ and Dy3+ ions.