Continued agricultural productivity in the western San Joaquin Valley, California, is threatened by the presence of shallow, poor-quality groundwater that can cause soil salinization. We evaluate the management alternative of using groundwater pumping to control the altitude of the water table and provide irrigation water requirements. A transient, three-dimensional, groundwater flow model was linked with nonlinear optimization to simulate management alternatives for the groundwater flow system. Optimal pumping strategies have been determined that substantially reduce the area subject to a shallow water table and bare-soil evaporation (that is, areas with a water table within 2.1 m of land surface) and the rate of drainflow to on-farm drainage systems. Optimal pumping strategies are constrained by the existing distribution of wells between the semiconfined and confined zones of the aquifer, by the distribution of sediment types (and associated hydraulic conductivities) in the western valley, and by the historical distribution of pumping throughout the western valley.