The production of a Z boson, decaying into two leptons and produced in association with one or more b jets, is studied using proton-proton collisions delivered by the LHC at a centre-of-mass energy of 7 TeV. The data were recorded in 2011 with the CMS detector and correspond to an integrated luminosity of 5 fb −1 . The Z( ℓℓ ) + b-jets cross sections (where ℓℓ = μμ or ee) are measured separately for a Z boson produced with exactly one b jet and with at least two b jets. In addition, a cross section ratio is extracted for a Z boson produced with at least one b jet, relative to a Z boson produced with at least one jet. The measured cross sections are compared to various theoretical predictions, and the data favour the predictions in the five-flavour scheme, where b quarks are assumed massless. The kinematic properties of the reconstructed particles are compared with the predictions from the M ad G raph event generator using the pythia parton shower simulation.