Ancient coral reefs formed between 600 million to 20 million years ago in the shallow waters of the Middle East provide an important source of oil. Reefs that developed close to continental margins have the best potential for oil reservoirs because they received organic input from nearby continental shelves. The article discusses the geologic history of reef formation in the region and factors like latitude, sea level fluctuations, and tectonic plate movement that influenced where reefs developed over time. Certain periods saw optimal conditions for reef growth, and some reefs from these periods now trap oil.