During the Permian Period, shallow seas covered the area that today forms White Sands National Park. The seas left behind gypsum (calcium sulfate), and subsequent tectonic activity lifted areas of the gypsum-rich seabed to form part of the San Andres and Sacramento Mountains. Over time, rain dissolved the water-soluble gypsum in the mountains, and rivers carried it to the Tularosa Basin, which has no outlet to the sea. The trapped water sank into the ground or formed shallow pools that subsequently dried out, leaving the gypsum on the surface in a crystalline form called selenite. Groundwater that flows out of the Tularosa Basin flows south into the Hueco Basin. During the last ice age, a 1,600-square-mile body of water named Lake Otero covered much of the basin. When it dried out, a large flat area of selenite crystals remained, which is named the Alkali Flat.
Lake Lucero is a dry lakebed in the southwest corner of the park, at one of the lowest points in the basin. Rain and snowmelt from the surrounding mountains and upwelling from deep groundwater within the basin periodically fill Lake Lucero with water containing dissolved gypsum. When filled, the lake covers about 10 square miles at a depth of 2–3 ft. As the water evaporates, small selenite crystals about 1 inch in diameter form on the surface of the lake. Most of the crystal formation occurs when large floods concentrate the mineralized water every ten to fourteen years. Wind and water break down the crystals into progressively smaller particles until they are fine grains of white gypsum sand.
The ground in the Alkali Flat and along Lake Lucero's shore is also covered with selenite crystals that measure up to 3 ft long. Weathering and erosion eventually break the crystals into sand-size grains that are carried away by the prevailing winds from the southwest, forming the white dunes. The dunes constantly change shape and slowly move downwind. Since gypsum is water-soluble, the sand that composes the dunes may dissolve and cement together after rain, forming a layer of sand that is more solid, which increases the wind resistance of the dunes. The increased resistance does not prevent dunes from quickly covering the plants in their path. Some species of plants can grow fast enough to avoid being buried by the dunes, while others utilize survival strategies such as the formation of a hardened pedestal around their roots to stabilize the plant amid the moving dunes.
Toward the western side of the dunefield, the dunes are more than 50 ft tall, and they become progressively smaller toward the eastern edge, until they come to an abrupt stop at the eastern boundary. Throughout the dunes, water is only a few feet (a meter) from the surface and very salty, but toward the western edge of the dunefield, the water is older and even saltier. The depth to groundwater also decreases from 5 ft below the surface on the eastern end to only 1–2 ft on the western end of the dunefield. The dunes at the western end have very little vegetation and move very quickly, while the dunes on the eastern end move very slowly and are very vegetated. Toward the western edge, the sand grains become larger and have all different shapes, while at the eastern edge they are all very small and round. The dunefield is much cooler and wetter than the surrounding hot, dry desert soils based on satellites images. Scientists have discovered what appear to be old lakeshores beneath the dunes using laser scanning technology. At each of these old lakeshore terraces, the dune movement and type of dunes changes greatly.