The first measurement of the electroweak production cross section of a Z boson with two jets (Zjj) in pp collisions at s√=7 TeV is presented, based on a data sample recorded by the CMS experiment at the LHC with an integrated luminosity of 5 fb−1. The cross section is measured for the ℓℓjj (ℓ = e, μ) final state in the kinematic region m ℓℓ > 50 GeV, m jj > 120 GeV, transverse momenta pjT>25 GeV and pseudorapidity |η j| < 4.0. The measurement, combining the muon and electron channels, yields σ = 154 ± 24 (stat.) ± 46 (exp. syst.) ± 27 (th. syst.) ± 3 (lum.) fb, in agreement with the theoretical cross section. The hadronic activity, in the rapidity interval between the jets, is also measured. These results establish an important foundation for the more general study of vector boson fusion processes, of relevance for Higgs boson searches and for measurements of electroweak gauge couplings and vector boson scattering.