Bacillus thuringiensis produces toxin crystals that are lethal to the caterpillars, but considered harmless to most other organisms, including humans. Therefore, the bacterium and its toxin are used in crop protection. This is done by spraying plants with the bacterium itself, or with an insecticide that contains the bacterial spores. Another way to protect plants is to create transgenic plants that carry the gene for the bacterial toxin, as it is currently done in the USA and Australia for cotton (Bt-cotton), maize (Bt-Maize), and other crops.
There are strains of Bt that are effective against other insect larvae. Bt israelensis is effective against mosquito larvae and some midges.