In X-ray crystallography, a least-squares structure refinement is used to two purposes: to prove the correctness of the proposed model and to improve it. In electron crystallography, the same tool would be desirable. However, the standard programs for least-squares structure refinement used in X-ray diffraction may give wrong results using electron diffraction data because the. kinematically calculated diffracted intensity is not valid for the interaction of electrons and crystals thicker than about 20 Angstrom for strong scatterers. In this paper, a new approach is presented that overcomes this problem and in addition takes into account all the advantages contained in dynamic scattering. The multislice method, well known in high-resolution electron microscopy (HREM), was combined with a least-squares algorithm, resulting in the multislice least-squares (MSLS) procedure. Experiments show that the atomic positions obtained by the new procedure are of the same accuracy as those obtained from single-crystal X-ray diffraction. However, the size of the single crystals used is much smaller (diameters down to +/-100 Angstrom). Also, light-atom positions can be determined with high precision by using data sets from crystal areas with different thicknesses. The multislice refinement gave good results up to 150 to 400 Angstrom depending on the composition of the crystal, with R values based on the intensities of less than 5%. An additional advantage of the approach is that some extra quantities (e.g. crystal thickness, crystal orientation) can be refined at the same time.