We focus on the segmentation of sonar images to achieve underwater object detection and classification. Our goal is to achieve accurate segmentation of the object's highlight and shadow regions. We target a robust solution that can manage different seabed backgrounds. Segmentation of sonar images is a challenging task. Speckle noise and intensity inhomogeneity may cause false detections, and complex seabed textures, like sand-ripples and sea-grass, often leading to false segmentation. In this paper,we propose our local spatial mixture (LSM) method for image segmentation of side-scan deployed sonar systems of any type. This new method estimates pixel labels in sonar images by incorporating the possible spatial correlation between neighboring pixels for improved segmentation. LSM modifies the expectation-maximization (EM) algorithm by adding an intermediate step (I-step) between the expectation (E-step) and maximization (M-step) steps. To combat intensity inhomogeneity, we employ a new initialization algorithm, one whose thresholds are set automatically to achieve and maintain robustness in various underwater environments. Using multiple evaluation indexes that measure the geometrical features of the segmented objects, we tested LSM using synthetic and real sonar images, one of which obtained from our own sea experiment. Our results show that LSM achieves improved segmentation performance over the state-of-the-art methods of four different approaches; LSM is also robust to different seabed textures and intensity inhomogeneity. We share the sonar images from our sea experiments.