We have used flux-transmission correlations in Lyα forests to measure the imprint of baryon acoustic oscillations (BAO). The study uses spectra of 157 783 quasars in the redshift range 2.1 ≤ z ≤ 3.5 from the Sloan Digital Sky Survey (SDSS) data release 12 (DR12). Besides the statistical improvements on our previous studies using SDSS DR9 and DR11, we have implemented numerous improvements in the analysis procedure, allowing us to construct a physical model of the correlation function and to investigate potential systematic errors in the determination of the BAO peak position. The Hubble distance, DH = c/H(z), relative to the sound horizon is DH(z = 2.33) /rd = 9.07 ± 0.31. The best-determined combination of comoving angular-diameter distance, DM, and the Hubble distance is found to be DH0.7DM0.3 /rd = 13.94 ± 0.35. This value is 1.028 ± 0.026 times the prediction of the flat-ΛCDM model consistent with the cosmic microwave background (CMB) anisotropy spectrum. The errors include marginalization over the effects of unidentified high-density absorption systems and fluctuations in ultraviolet ionizing radiation. Independently of the CMB measurements, the combination of our results and other BAO observations determine the open-ΛCDM density parameters to be ΩM = 0.296 ± 0.029, ΩΛ = 0.699 ± 0.100 and Ωk = -0.002 ± 0.119.