The exposed geology of the Death Valley area presents a diverse and complex set of at least 23 formations of sedimentary units, two major gaps in the geologic record called unconformities, and at least one distinct set of related formations geologists call a group. The oldest rocks in the area that now includes Death Valley National Park are extensively metamorphosed by intense heat and pressure and are at least 1700 million years old. These rocks were intruded by a mass of granite 1400 Ma (million years ago) and later uplifted and exposed to nearly 500 million years of erosion.
Marine deposition occurred 1200 to 800 Ma, forming thick sequences of conglomerate, mudstone, and carbonate rock topped by stromatolites, and possibly glacial deposits from the hypothesized Snowball Earth event. Rifting thinned huge roughly linear parts of the supercontinent Rodinia enough to allow sea water to invade and divide its landmass into component continents separated by narrow straits. A passive margin developed on the edges of these new seas in the Death Valley region. Carbonate banks formed on this part of the two margins only to be subsided as the continental crust thinned until it broke, giving birth to a new ocean basin. An accretion wedge of clastic sediment then started to accumulate at the base of the submerged precipice, entombing the region's first known fossils of complex life. These sandy mudflats gave way about 550 Ma to a carbonate platform which lasted for the next 300 million years of Paleozoic time.
The passive margin switched to active margin in the early-to-mid Mesozoic when the Farallon Plate under the Pacific Ocean started to dive below the North American Plate, initiating a subduction zone; volcanoes and uplifting mountains were produced as a result. Erosion over many millions of years formed a relatively featureless plain. Stretching of the crust under western North America started around 16 Ma and is thought to be caused by upwelling from the subducted spreading-zone of the Farallon Plate. This process continues into the present and is thought to be responsible for producing the Basin and Range province. By 2 to 3 million years ago this province had spread to the Death Valley area, ripping it apart and giving birth to Death Valley, Panamint Valley and surrounding ranges. These valleys partially filled with sediment and, during colder periods during the current ice age, with lakes. Lake Manly was the largest of these lakes; it filled Death Valley during each glacial period from 240,000 years ago to 10,000 years ago. By 10,500 years ago these lakes were increasingly cut off from glacial melt from the Sierra Nevada, starving them of water and concentrating salts and minerals. The desert environment seen today developed after these lakes dried up.