© 2017 The Authors Published by Oxford University Press. We present cosmological results from the final galaxy clustering data set of the Baryon Oscillation Spectroscopic Survey, part of the Sloan Digital Sky Survey III. Our combined galaxy sample comprises 1.2 million massive galaxies over an effective area of 9329 deg2and volume of 18.7 Gpc3, divided into three partially overlapping redshift slices centred at effective redshifts 0.38, 0.51 and 0.61. We measure the angular diameter distance DMand Hubble parameterHfrom the baryon acoustic oscillation (BAO) method, in combinationwith a cosmic microwave background prior on the sound horizon scale, after applying reconstruction to reduce non-linear effects on the BAO feature. Using the anisotropic clustering of the pre-reconstruction density field, we measure the product DMH from the Alcock-Paczynski (AP) effect and the growth of structure, quantified by fσ8(z), from redshift-space distortions (RSD). We combine individual measurements presented in seven companion papers into a set of consensus values and likelihoods, obtaining constraints that are tighter and more robust than those from any one method; in particular, the AP measurement from sub-BAO scales sharpens constraints from post-reconstruction BAOs by breaking degeneracy between DMand H. Combined with Planck 2016 cosmic microwave background measurements, our distance scale measurements simultaneously imply curvature ωK = 0.0003 ± 0.0026 and a dark energy equation-of-state parameter ω =-1.01 ± 0.06, in strong affirmation of the spatially flat cold dark matter (CDM) model with a cosmological constant (ΛCDM). Our RSD measurements of fσ8, at 6 per cent precision, are similarly consistent with this model. When combined with supernova Ia data, we find H0= 67.3 ± 1.0 kms-1Mpc-1even for our most general dark energy model, in tension with some direct measurements. Adding extra relativistic species as a degree of freedom loosens the constraint only slightly, to H0= 67.8 ± 1.2 kms-1Mpc-1. Assuming flat ΛCDM, we find ωm = 0.310 ± 0.005 and H0= 67.6 ± 0.5 kms-1Mpc-1, and we find a 95 per cent upper limit of 0.16 eV c-2on the neutrino mass sum.