When key nutrients are in short supply, endospore forming bacteria can form an ametabolic, dehydrated state of suspended animation called an endospore. This forms a core . The cell is synthesizing special compounds it needs to form the endospore. When those compounds are all made, the future endospore is called the sporangium . The sporangium matures into a prospore as the rest of the vegetative cell just disintegrates.
Protective layers start being secreted from the core to cover and protect it.
Spore coats of keratinlike proteins impervious to chemicals are secreted to the outside of the cortex. Finally an exosporium of lipoprotein forms the most external layer. By the time the external layers are laid down, the rest of the vegetative cell is dead and disintegrated, releasing the endospore into the environment. The bacterial endospore is the most difficult to kill life form there is. The endospore is resistant to heat, drying, chemicals, radiation, and practically anything else that normally kills vegetative cells.