Samples of shallow groundwater that underlies much of the irrigated area in the western San Joaquin Valley, CA, were analyzed for various major ions and trace elements, including selenium. Concentrations of the major ions generally were similar for groundwater collected in the two primary geologic zones - the alluvial fan and basin trough. Selenium concentrations are significantly (α = 0.05) higher in the groundwater of the alluvial-fan zone than in that of the basin-trough zone. The concentrations of oxyanion trace elements were significantly correlated (α = 0.05) with groundwater salinity, but the correlations between selenium and salinity and between molybdenum and salinity were significantly different (α = 0.05) in the alluvial-fan geologic zone compared with those in the basin-trough geologic zone. The evidence suggests that the main factors affecting selenium concentrations in the shallow groundwater are the degree of groundwater salinity and the geologic source of the alluvial soil material.