A microbial mat is a multi-layered sheet of microorganisms, mainly bacteria and archaea. Microbial mats grow at interfaces between different types of material, mostly on submerged or moist surfaces, but a few survive in deserts. They colonize environments ranging in temperature from –40 °C to 120 °C. A few are found as endosymbionts of animals.Although only a few centimetres thick at most, microbial mats create a wide range of internal chemical environments, and hence generally consist of layers of microorganisms that can feed on or at least tolerate the dominant chemicals at their level and which are usually of closely related species. In moist conditions mats are usually held together by slimy substances secreted by the micro-organisms, and in many cases some of the micro-organisms form tangled webs of filaments which make the mat tougher. The best known physical forms are flat mats and stubby pillars called stromatolites, but there are also spherical forms.Microbial mats are the earliest form of life on Earth for which there is good fossil evidence, from 3,500 million years ago, and have been the most important members and maintainers of the planet's ecosystems. Originally they depended on hydrothermal vents for energy and chemical ""food"", but the development of photosynthesis gradually liberated them from the ""hydrothermal ghetto"" by providing a more widely available energy source, sunlight, although initially the photosynthesizing mats still depended on the diffusion of chemicals emitted by hydrothermal vents. The final and most significant stage of this liberation was the development of oxygen-producing photosynthesis, since the main chemical inputs for this are carbon dioxide and water.As a result, microbial mats began to produce the atmosphere we know today, in which free oxygen is a vital component. At around the same time they may also have been the birthplace of the more complex eukaryote type of cell, of which all multicellular organisms are composed. Microbial mats were abundant on the shallow seabed until the Cambrian substrate revolution, when animals living in shallow seas increased their burrowing capabilities and thus broke up the surfaces of mats and let oxygenated water into the deeper layers, poisoning the oxygen-intolerant micro-organisms that lived there. Although this revolution drove mats off soft floors of shallow seas, they still flourish in many environments where burrowing is limited or impossible, including rocky seabeds and shores, hyper-saline and brackish lagoons, and are found on the floors of the deep oceans.Because of microbial mats' ability to use almost anything as ""food"", there is considerable interest in industrial uses of mats, especially for water treatment and for cleaning up pollution.