Oil and gas takes between tens of millions and hundreds of millions of years to form naturally. About 70 percent of current oil deposits derived from the Mesozoic period, which lasted from 65 million years to 150 million years ago.
Oil and natural gas come from ocean-dwelling organisms that absorbed sunlight and stored it in their bodies in chains of carbon atoms. When they died, their energy-laden bodies sank beneath the sediment and mixed with other biological elements. The combination slowly turned to oil or gas, which rose to the top of the ocean and land where the rock was porous and the water dried up.