Irrigation water (including rainfall) that infiltrates the subsurface carries salts, pesticide and fertilizer residues, and other trace elements, thus causing a contamination of aquifers and soils. A similar situation occurs when irrigating with saline groundwater (aquifers containing saline water often are found in arid and semi-arid regions, where agricultural production depends critically on groundwater irrigation). Evaporation of the irrigation water increases salt concentration, causing salinization of soils and aquifers. Although not immediately noticeable, these quality deterioration processes will have long-term effects and therefore require careful management. The paper describes a general framework for the intertemporal management of a conjunctive ground and surface water irrigation system, taking into account the quality deterioration processes. Policy implications are discussed and the results are compared with those that come from a model which neglects quality effects.