This paper addresses the problem of building large-scale maps of indoor environments with mobile robots. It proposes a statisticalapproach that phrases the map buildingproblem as a constrained maximum-likelihood estimation problem, for which it devises a practical algorithm. Experimental results in large, cyclic environments illustrate the appropriateness of the approach.