A mixture model with spatial constraint is proposed for image segmentation. This model assumes that the pixel label priors are similar if the pixels are close in geometry. An energy function is defined on the spatial space for measuring the spatial information. We also derive an energy function on the observed data space from the log-likelihood function of the standard mixture model. We estimate the model parameters by minimizing the combination of the two energy functions, using the gradient descent algorithm. Then we use the parameters to compute the posterior probability. Finally, each pixel can be assigned to a class using the maximum a posterior decision rule. Numerical experiments are presented where the proposed method and other mixture model-based methods are tested on synthetic and real-world images. These experimental results demonstrate that the proposed method achieves competitive performance compared with other spatially constrained mixture model-based methods.