We study the spatial variation in earthquake ground motions, or equivalently the dynamic displacement gradient field, using a novel analysis procedure borrowed from geodesy. Seismic data recorded in the Valley of Mexico by a microarray of three three-component surface accelerographs and two three-component accelerographs at depths of 30 m and 102 m constrain our estimates of the dynamic displacement gradient field (from which strains and rotations derive) for four moderate earthquakes at distances of 250 to 300 km. Our study focuses on the effects of low-velocity surface materials on the deformation. At the surface, the gradients corresponding to deformation across vertical planes dominate, and vertical-axis rotations are of similar magnitudes as strains. The greatest peak surface gradient we observed was 206 μstrain for the 14 September 1995 MW 7.5 earthquake at a distance of ∼300 km. However, much larger gradients occur across horizontal planes (∂u/∂z, where u is a horizontal displacement and z is depth) at some depth between 0 and 30 m. These values are about a factor 10 greater than the corresponding gradient components at the surface. ∂u/∂z for the 14 September earthquake equaled or exceeded 665 μstrain at depth. The dynamic deformations experienced in Mexico City undoubtedly have occurred before and will occur again in other densely populated areas. However, in many other regions, the sediment response will not remain linear and elastic, resulting instead in liquefaction and ground failure.