Registering 3D point sets is a common problem in computer vision. The case of two point sets has been analytically well solved by several authors. In this paper we present an analytic solution for solving the problem of a simultaneous registration of M point sets, M > 2, by rigid motions. The solution is based on the use of unit quaternions for the representation of the rotations. We show that the rotation optimization can be decoupled from the translation one. The optimal translations are given by the resolution of a linear equation system which depends on the rotated centroid of the overlaps. The unit quaternions representing the best rotations are optimized by applying an iterative process on symmetric 4 ? 4 matrices. The matrices correspond to the mutual overlaps between the point sets. We have applied this method to the registration of several overlapping 3D surfaces sampled on an object. Our results on simulated and real data show that the algorithm works efficiently.