We introduce a method to constrain general cosmological models using Baryon Acoustic Oscillation ( BAO ) distance measurements from galaxy samples covering different redshift ranges , and apply this method to analyse samples drawn from the SDSS and 2dFGRS . BAO are detected in the clustering of the combined 2dFGRS and SDSS main galaxy samples , and measure the distance–redshift relation at z = 0.2 . BAO in the clustering of the SDSS luminous red galaxies measure the distance–redshift relation at z = 0.35 . The observed scale of the BAO calculated from these samples and from the combined sample are jointly analysed using estimates of the correlated errors , to constrain the form of the distance measure D _ { V } ( z ) \equiv [ ( 1 + z ) ^ { 2 } D _ { A } ^ { 2 } cz / H ( z ) ] ^ { 1 / 3 } . Here D _ { A } is the angular diameter distance , and H ( z ) is the Hubble parameter . This gives r _ { s } / D _ { V } ( 0.2 ) = 0.1980 \pm 0.0058 and r _ { s } / D _ { V } ( 0.35 ) = 0.1094 \pm 0.0033 ( 1 \sigma errors ) , with correlation coefficient of 0.39 , where r _ { s } is the comoving sound horizon scale at recombination . Matching the BAO to have the same measured scale at all redshifts then gives D _ { V } ( 0.35 ) / D _ { V } ( 0.2 ) = 1.812 \pm 0.060 . The recovered ratio is roughly consistent with that predicted by the higher redshift SNLS supernovae data for \Lambda CDM cosmologies , but does require slightly stronger cosmological acceleration at low redshift . If we force the cosmological model to be flat with constant w , then we find \mbox { $ \Omega _ { m } $ } = 0.249 \pm 0.018 and w = -1.004 \pm 0.089 after combining with the SNLS data , and including the WMAP measurement of the apparent acoustic horizon angle in the CMB .