The first measurement of vector-boson production associated with a top quark-antiquark pair in proton-proton collisions at s√=7 TeV is presented. The results are based on a data set corresponding to an integrated luminosity of 5.0 fb−1, recorded by the CMS detector at the LHC in 2011. The measurement is performed in two independent channels through a trilepton analysis of tt¯Z events and a same-sign dilepton analysis of tt¯V (V=W or Z) events. In the trilepton channel a direct measurement of the tt¯Z cross section σtt¯Z=0.28+0.14−0.11 (stat)+0.06−0.03 (syst) pb is obtained. In the dilepton channel a measurement of the tt¯V cross section yields σtt¯V=0.43+0.17−0.15 (stat)+0.09−0.07 (syst) pb. These measurements have a significance, respectively, of 3.3 and 3.0 standard deviations from the background hypotheses and are compatible, within uncertainties, with the corresponding next-to-leading order predictions of 0.137+0.012−0.016 and 0.306+0.031−0.053 pb.