Energy enters ecosystems through solar energy captured by plants via photosynthesis. Plants store this energy which is then transferred to herbivores that eat the plants. Herbivores then transfer the energy to carnivores that eat them. Carnivores pass energy to detritivores such as bacteria and fungi through their waste and remains. Detritivores and decomposers break down organic matter, returning energy to the soil and atmosphere to be reused by plants, completing the cycle. The Quran references this energy cycle, mentioning how God provides sunlight for plants and rain to nourish plants for human and animal sustenance.