A measurement of the top quark–antiquark pair production cross section σ t t ¯ in proton–proton collisions at a centre-of-mass energy of 13Te is presented. The data correspond to an integrated luminosity of 35.9fb-1, recorded by the CMS experiment at the CERN LHC in 2016. Dilepton events (e ± μ ∓ , μ + μ - , e + e - ) are selected and the cross section is measured from a likelihood fit. For a top quark mass parameter in the simulation of mtMC=172.5Ge the fit yields a measured cross section σtt¯=803±2(stat)±25(syst)±20(lumi)pb, in agreement with the expectation from the standard model calculation at next-to-next-to-leading order. A simultaneous fit of the cross section and the top quark mass parameter in the powheg simulation is performed. The measured value of mtMC=172.33±0.14(stat)-0.72+0.66(syst)Ge is in good agreement with previous measurements. The resulting cross section is used, together with the theoretical prediction, to determine the top quark mass and to extract a value of the strong coupling constant with different sets of parton distribution functions.