Bacteria use a number of mechanisms for coping with the toxic effects exerted by nitric oxide (NO) and its derivatives. Here we show that the flavohemoglobin encoded by the hmp gene has a vital role in an adaptive response to protect the soil bacterium Bacillus subtilis from nitrosative stress. We further show that nitrosative stress induced by the nitrosonium cation donor sodium nitroprusside (SNP) leads to deactivation of the transcriptional repressor NsrR, resulting in derepression of hmp. Nitrosative stress induces the sigma B-controlled general stress regulon. However, a sigB null mutant did not show increased sensitivity to SNP, suggesting that the sigma B-dependent stress proteins are involved in a nonspecific protection against stress whereas the Hmp flavohemoglobin plays a central role in detoxification. Mutations in the yjbIH operon, which encodes a truncated hemoglobin (YjbI) and a predicted 34-kDa cytosolic protein of unknown function (YjbH), rendered B. subtilis hypersensitive to SNP, suggesting roles in nitrosative stress management.