Four-lepton production in proton–proton collisions, pp→(Z/γ∗)(Z/γ∗)→ l+l-l'+l'-, where l, l'=e or μ, is studied at a center-of-mass energy of 13 TeV with the CMS detector at the LHC. The data sample corresponds to an integrated luminosity of 2.6fb−1. The ZZ production cross section, σ(pp→ZZ) = 14.6+1.9−1.8(stat) +0.5−0.3(syst) ±0.2 (theo)±0.4 (lumi) pb, is measured for events with two opposite-sign, same-flavor lepton pairs produced in the mass region 60 < ml+l−, ml'+l'− < 120 GeV. The Z boson branching fraction to four leptons is measured to be B(Z →l+l−l'+l'−) =4.9+0.8−0.7(stat) +0.3−0.2(syst) +0.2−0.1(theo) ±0.1(lumi) ×10−6 for the four-lepton invariant mass in the range 80 <ml+l−l'+l'− < 100 GeV and dilepton mass ml+l−> 4 GeV for all opposite-sign, same-flavor lepton pairs. The results are in agreement with standard model predictions.