In a nutshell: Bacteria thrive fastest at temperatures ranging from 4°C to 60°C. To ensure food safety, follow the 2-hour / 4-hour rule for food left at room temperature after cooking.
Storing food at the "Temperature Danger Zone" between 4°C and 60°C allows various types of bacteria to grow rapidly.
Proper temperature control at all stages of food preparation is an effective way to prevent bacterial food poisoning. While chilling will inhibit bacterial growth (but cannot kill them), high temperature treatment can destroy bacteria effectively.
2-hour / 4-hour rule: to keep, to eat or to throw away?
The 2-hour / 4-hour rule is a good way to keep food safe even if it has been out of refrigeration or placed at ambient temperature after cooking. The rule has been scientifically proven and is based on how fast microorganisms grow in food at the Temperature Danger Zone between 4°C and 60°C.
The table below outlines the 2-hour / 4-hour rule. ✓ means "yes" and X means "no".