Risk in any complex technology is unavoidable. One of the best ways to reduce risk in the future is to learn from the mistakes of the past. Between June 1985 and January 1987, the Therac-25, a computerized radiation therapy machine, was involved in six massive radiation overdoses. As a result. several people died and others were seriously injured. These accidents have been described as the worst series of radiation accidents in the 35-year history of medical accelerators. Published descriptions of the Therac-25 medical electron accelerator accidents leave out important details and are thus often misleading. The authors present a detailed investigation of the factors involved in the overdoses and attempts by users, manufacturers, and government agencies to deal with the accidents. Most accidents are system accidents stemming from complex interactions between various components and activities. To attribute a single cause to an accident is usually a mistake. The authors demonstrate (1) the complex nature of accidents and (2) the need to investigate all aspects of system development and operation in order to prevent future accidents. The authors also present some lessons learned in terms of system engineering, software engineering, and government regulation of safety-critical systems containing software components.