In this paper, the feasibility of automatic least-squares re®nement of a Monte Carlo model of a disordered structure by quantitative comparison of its calculated diffraction pattern with observed diffuse scattering data is demonstrated. At each stage of the re®nement, the goodness-of ®t parameter 1 2 is used as a quantitative measure of the agreement of the model with the observed data. Numerical estimates of the differentials of 1 2 with respect to the model parameters are calculated and these are used to provide automatic updating of the parameters via a least-squares algorithm. The method has been applied to the material Fe 3 (CO) 12 which shows strong diffuse scattering caused by the fact that the triangular Fe 3 group can occupy a given molecular site, in either of two different orientations. A model has been re®ned involving 16 independent parameters that describe both the correlation of neighbouring occupancy variables and local orientational and centre-of-mass translational relaxation displacements. Although the method still presents a formidable computational task even for the fastest of modern computers, the work described represents a signi®cant ®rst step towards the ultimate goal of allowing routine analysis of diffuse scattering data.