A search for associated production of a Z boson with an open charm meson is presented using a data sample, corresponding to an integrated luminosity of 1.0 fb−1 of proton-proton collisions at a centre-of-mass energy of 7TeV, collected by the LHCb experiment. Seven candidate events for associated production of a Z boson with a D0 meson and four candidate events for a Z boson with a D+ meson are observed with a combined significance of 5.1 standard deviations. The production cross-sections in the forward region are measured to be σZ → μ+μ−,D0 = 2.50 ± 1.12 ± 0.22 pb, σZ → μ+μ−,D+ = 0.44 ± 0.23 ± 0.03 pb, where the first uncertainty is statistical and the second systematic. © CERN, for the benefit of the LHCb Collaboration.