Aquatic phytoplankton and zooplankton that died and sedimented in large quantities under anoxic conditions millions of years ago began forming petroleum and natural gas as a result of anaerobic decomposition (by contrast, terrestrial plants tended to form coal and methane). Over geological time this organic matter, mixed with mud, became buried under further heavy layers of inorganic sediment. The resulting high temperature and pressure caused the organic matter to chemically alter, first into a waxy material known as kerogen, which is found in oil shales, and then with more heat into liquid and gaseous hydrocarbons in a process known as catagenesis.
Such organisms and their resulting fossil fuels typically have an age of millions of years, and sometimes more than 650 million years, the energy released in combustion is still photosynthetic in origin.