The growth and virulence of the bacteria Bacillus thuringiensis depends on the production of Cry toxins, which are used to perforate the gut of its host. Successful invasion of the host relies on producing a threshold amount of toxin, after which there is no benefit from producing more toxin. Consequently, the production of Cry toxin appears to be a different type of social problem compared with the public goods scenarios that bacteria usually encounter. We show that selection for toxin production is a volunteer's dilemma. We make specific predictions that: (1) selection for toxin production depends upon an interplay between the number of bacterial cells that each host ingests, and the genetic relatedness between those cells; (2) cheats tha...