DNA damage and perturbations in DNA replication can induce global transcriptional responses that can help organisms repair the damage and survive. RecA is known to mediate transcriptional responses to DNA damage in several bacterial species by inactivating the repressor LexA and phage repressors. To gain insight into how Bacillus subtilis responds to various types of DNA damage, we measured the effects of DNA damage and perturbations in replication on mRNA levels by using DNA microarrays. We perturbed replication either directly with p-hydroxyphenylazo-uracil (HPUra), an inhibitor of DNA polymerase, or indirectly with the DNA-damaging reagents mitomycin C (MMC) and UV irradiation. Our results indicate that the transcriptional responses to HPUra, MMC, and UV are only partially overlapping. recA is the major transcriptional regulator under all of the tested conditions, and LexA appears to directly repress the expression of 63 genes in 26 operons, including the 18 operons previously identified as LexA targets. MMC and HPUra treatments caused induction of an integrative and conjugative element (ICEBs1) and resident prophages (PBSX and SPbeta), which affected the expression of many host genes. Consistent with previous results, the induction of these mobile elements required recA. Induction of the phage appeared to require inactivation of LexA. Unrepaired UV damage and treatment with MMC also affected the expression of some of the genes that are controlled by DnaA. Furthermore, MMC treatment caused an increase in origin-proximal gene dosage. Our results indicate that different types of DNA damage have different effects on replication and on the global transcriptional profile.