Oil is generated when the kerogen temperature reaches 60-120 °C; at higher temperatures, it is mainly gas that is generated. As oil and gas form, they seep out of the source rock. Because hydrocarbons are lighter than water, the oil and gas migrate upwards in porous water-bearing rock.