A robust and stable inversion algorithm for the joint reconstruction of different archaeological features, such as pit houses, ditch systems or single pits, from surface magnetic data was developed. In a first step a simplified model is assumed to estimate the mean magnetization direction. During the second step the shape of the features is estimated automatically. The algorithm is based upon an evolutionary strategy and the Marquardt Levenberg method. It was tested on real and synthetic data. The influence of inhomogeneous pit fillings on depth estimates was studied. © 1997 John Wiley & Sons, Ltd.