A new real space method, based on the principles of simulated annealing, is presented for determining protein structures on the basis of interproton distance restraints derived from NMR data. The method circumvents the folding problem associated with all real space methods described to date, by starting from a completely random array of atoms and introducing the force constants for the covalent, interproton distance and repulsive van der Waals terms in the target function appropriately. The system is simulated at high temperature by solving Newton's equations of motion. As the values of all force constants are very low during the early stages of the simulation, energy barriers between different folds of the protein can be overcome, and the global minimum of the target function is reliably located. Further, because the atoms are initially only weakly coupled, they can move essentially independently to satisfy the restraints. The method is illustrated using two examples of small proteins, namely crambin (46 residues) and potato carboxypeptidase inhibitor (39 residues).