Registering sonar images to correctly describe seafloors and explain wide geological or biological phenomena is often achieved manually requiring significant human resources. This paper proposes an automatic intensity-based registration algorithm that relies on the optimization of a new similarity measure (SM), within a multiresolution block matching framework. Indeed, several SMs have been evaluated and ranked on real sidescan sonar data to determine the most relevant intensity dependencies between images for matching purposes. Correlation ratio (CR) and mutual information (MI) are then selected and because of their complementary behaviors, merged in a new SM (MI&CR), which performs better than CR or MI alone, to determine robust matching blocks between images. Thus, the proposed two-step registration algorithm uses MI&CR to match two sonar images: a single rigid translation globally matches the images, then a field of locally applied translations is computed for adjusting the final registration to remaining local distortions. Actual processing time can then be tuned according to the required registration accuracy. Due to a survey standard operating mode, only same-survey overlapping images are considered as candidates for matching. Moreover, building mosaics from registered images assumes a flat sea bottom as no global elevation information is provided by sidescan sonar images.