This paper investigates strategies to alleviate the effects of droughts on the profitability and sustainability of irrigated agriculture. These strategies include conjunctive management of surface water and groundwater resources, and engineered improvements such as lining of irrigation canals and addition of regional pumping well capacity. A spatially distributed simulation-optimization model was developed for an irrigated system consisting of multiple surface water reservoirs and an alluvial aquifer. The simulation model consists of an agronomic component and simulators describing the hydrologic system. The physical models account for storage and flow through the reservoirs, routing through the irrigation canals, and regional groundwater flow. The agronomic model describes crop productivity as a function of irrigation quantity and salinity, and determines agricultural profit. A profit maximization problem was formulated and solved using large-scale constrained gradient-based optimization. The model was applied to a real-world conjunctive surface water/groundwater management problem in the Yaqui Valley, an irrigated agricultural region in Sonora, Mexico. The model reproduces recorded reductions in agricultural production during a historical drought. These reductions were caused by a decline in surface water availability and limited installed pumping capacity. Results indicate that the impact of the historical 8-year drought could have been significantly reduced without affecting profit in wet years by better managing surface water and groundwater resources. Namely, groundwater could have been more heavily relied upon and surface water allocation capped at a sustainable level as an operating rule. Lining the irrigation canals would have resulted in water savings of 30% of historical reservoir releases during wet years, which could have been used in subsequent drier years to increase agricultural production. The benefits of a greater reliance on groundwater pumping by installing additional wells are limited due to pumping restrictions near the coast to avoid seawater intrusion and due to increased pumping costs.