Sediments and crude oils contain the same types of hydrocarbons. This analogy indicates that petroleum is derived from sedimentary organic matter. The close resemblances of hydrocarbons in sediments and crude oils to plant and animal products show that most of these hydrocarbons are obtained either directly from the remains of living things or are minor modifications of living matter. Although many sediment and petroleum hydrocarbons are of the same type and are derived from a common source, the distributions of these compounds in petroleum differ from their distributions in sediments. Therefore, the conversion or accumulation of sedimentary organic matter to form petroleum must be done selectively. An explanation is presented of how water serving as the accumulating agent can produce the changes in distribution that are observed between sedimentary organic matter and petroleum.