The purpose of the work reported here is to test the hypothesis that natural genetic transformation in the bacterium Bacillus subtilis has evolved as a DNA repair system. Specifically, tests were made to determine whether transformation functions to provide DNA template for the bacteria] cell to use in recombinational repair. The survivorship and the homologous transformation rate as a function of dose of ultraviolet irradiation (UV) was studied in two experimental treatments, in which cells were either transformed before (DNA-UV), or after (UV-DNA), treatment with UV. The results show that there is a qualitative difference in the relationship between the survival of transformed cells (sexual cells) and total cells (primarily asexual cells) in the two treatments. As predicted by the repair hypothesis, in the UV-DNA treatment, transformed cells had greater average survivorship than total cells, while in the DNA-UV treatment this relationship was reversed. There was also a consistent and qualitative difference between the UV-DNA and DNA-UV treatments in the relationship between the homologous transformation rate (transformed cells/total cells) and UV dosage. As predicted by the repair hypothesis, the homologous transformation rate increases with UV dose in the UV-DNA experiments but decreases with UV dose in the DNA-UV treatments. However, the transformation rate for plasmid DNA does not increase in a UV-DNA treatment. These results support the DNA repair hypothesis for the evolution of transformation in particular, and sex generally.