Accurate localization and contouring of prostate are important issues in prostate cancer diagnosis and/or therapies. Although several semi-automatic and automatic segmentation methods have been proposed, manual expert correction remains necessary. Our paper introduces an original method for automatic 3D segmentation of the prostate gland from Magnetic Resonance Imaging data. We use a statistical shape model as a priori knowledge, and we model gray levels distribution by fitting histogram modes with a Gaussian mixture. Markov fields are used to introduce contextual information regarding voxels neighbourhood. Final labelling optimization is based on Bayesian a posteriori classification, estimated with the Iterative Conditional Mode algorithm (ICM). We compared the accuracy of this method, free from any manual correction, with contours outlined by an expert radiologist. In 6 random cases, including prostates with cancer and benign prostatic hypertrophy (BPH), mean Hausdorff distance (HD) and Overlap Ratio (OR) were 9.94 mm and 0.83, respectively. Beyond fast computing times, this new method showed satisfying results, even at prostate's base and apex.