Stochastic petrophysical inversion is a method used to predict reservoir properties from seismic data. Recent advances in stochastic optimization allow generating multiple realizations of rock and fluid properties conditioned on seismic data. To match the measured data and represent the uncertainty of the model variables, many realizations are generally required. Stochastic sampling and optimization of spatially correlated models are computationally demanding. Monte Carlo methods allow quantifying the uncertainty of the model variables but are impractical for high-dimensional models with spatially correlated variables. We have developed a Bayesian approach based on an efficient implementation of the Markov chain Monte Carlo (MCMC) method for the inversion of seismic data for the prediction of reservoir properties. Our Bayesian approach includes an explicit vertical correlation model in the proposal distribution. It is applied trace by trace, and the lateral continuity model is imposed by using the previously simulated values at the adjacent traces as conditioning data for simulating the initial model at the current trace. The methodology is first presented for a 1D problem to test the vertical correlation, and it is extended to 2D problems by including the lateral correlation and comparing two novel implementations based on sequential sampling. Our method is applied to synthetic data to estimate the posterior distribution of the petrophysical properties conditioned on the measured seismic data. The results are compared with an MCMC implementation without lateral correlation and demonstrate the advantage of integrating a spatial correlation model.