We present a search for a narrow scalar or vector resonance decaying into Zgamma with a subsequent Z decay into a pair of electrons or muons. The data for this search were collected with the D0 detector at the Fermilab Tevatron ppbar collider at a center of mass energy sqrt(s) = 1.96 TeV. Using 1.1 (1.0) fb-1 of data, we observe 49 (50) candidate events in the electron (muon) channel, in good agreement with the standard model prediction. From the combination of both channels, we derive 95% C.L. upper limits on the cross section times branching fraction (sigma x B) into Zgamma. These limits range from 0.19 (0.20) pb for a scalar (vector) resonance mass of 600 GeV/c^2 to 2.5 (3.1) pb for a mass of 140 GeV/c^2.