The upper Klamath Basin encompasses about 8,000 square miles, extending from the Cascade Range east to the Basin and Range geologic province in south-central Oregon and northern California. The geography of the basin is dominated by forested volcanic uplands separated by broad interior basins. Most of the interior basins once held broad shallow lakes and extensive wetlands, but most of these areas have been drained or otherwise modified and are now cultivated. Major parts of the interior basins are managed as wildlife refuges, primarily for migratory waterfowl. The permeable volcanic bedrock of the upper Klamath Basin hosts a substantial regional groundwater system that provides much of the flow to major streams and lakes that, in turn, provide water for wildlife habitat and are the principal source of irrigation water for the basin's agricultural economy. Increased allocation of surface water for endangered species in the past decade has resulted in increased groundwater pumping and growing interest in the use of groundwater for irrigation. The potential effects of increased groundwater pumping on groundwater levels and discharge to springs and streams has caused concern among groundwater users, wildlife and Tribal interests, and State and Federal resource managers. To provide information on the potential impacts of increased groundwater development and to aid in the development of a groundwater management strategy, the U.S. Geological Survey, in collaboration with the Oregon Water Resources Department and the Bureau of Reclamation, has developed a groundwater model that can simulate the response of the hydrologic system to these new stresses. The groundwater model was developed using the U.S. Geological Survey MODFLOW finite-difference modeling code and calibrated using inverse methods to transient conditions from 1989 through 2004 with quarterly stress periods. Groundwater recharge and agricultural and municipal pumping are specified for each stress period. All major streams and most major tributaries for which a substantial part of the flow comes from groundwater discharge are included in the model. Groundwater discharge to agricultural drains, evapotranspiration from aquifers in areas of shallow groundwater, and groundwater flow to and from adjacent basins also are simulated in key areas. The model has the capability to calculate the effects of pumping and other external stresses on groundwater levels, discharge to streams, and other boundary fluxes, such as discharge to drains. Historical data indicate that the groundwater system in the upper Klamath Basin fluctuates in response to decadal climate cycles, with groundwater levels and spring flows rising and declining in response to wet and dry periods. Data also show that groundwater levels fluctuate seasonally and interannually in response to groundwater pumping. The most prominent response is to the marked increase in groundwater pumping starting in 2001. The calibrated model is able to simulate observed decadal-scale climate-driven fluctuations in the groundwater system as well as observed shorter-term pumping-related fluctuations. Example model simulations show that the timing and location of the effects of groundwater pumping vary markedly depending on the pumping location. Pumping from wells close (within a few miles) to groundwater discharge features, such as springs, drains, and certain streams, can affect those features within weeks or months of the onset of pumping, and the impacts can be essentially fully manifested in several years. Simulations indicate that seasonal variations in pumping rates are buffered by the groundwater system, and peak impacts are closer to mean annual pumping rates than to instantaneous rates. Thus, pumping effects are, to a large degree, spread out over the entire year. When pumping locations are distant (more than several miles) from discharge features, the effects take many years or decades to fully impact those features, and much of the pumped water comes from groundwater storage over a broad geographic area even after two decades. Moreover, because the effects are spread out over a broad area, the impacts to individual features are much smaller than in the case of nearby pumping. Simulations show that the discharge features most affected by pumping in the area of the Bureau of Reclamation's Klamath Irrigation Project are agricultural drains, and impacts to other surface-water features are small in comparison. A groundwater management model was developed that uses techniques of constrained optimization along with the groundwater flow model to identify the optimal strategy to meet water user needs while not violating defined constraints on impacts to groundwater levels and streamflows. The coupled groundwater simulation-optimization models were formulated to help identify strategies to meet water demand in the upper Klamath Basin. The models maximize groundwater pumping while simultaneously keeping the detrimental impacts of pumping on groundwater levels and groundwater discharge within prescribed limits. Total groundwater withdrawals were calculated under alternative constraints for drawdown, reductions in groundwater discharge to surface water, and water demand to understand the potential benefits and limitations for groundwater development in the upper Klamath Basin. The simulation-optimization model for the upper Klamath Basin provides an improved understanding of how the groundwater and surface-water system responds to sustained groundwater pumping within the Bureau of Reclamation's Klamath Project. Optimization model results demonstrate that a certain amount of supplemental groundwater pumping can occur without exceeding defined limits on drawdown and stream capture. The results of the different applications of the model demonstrate the importance of identifying constraint limits in order to better define the amount and distribution of groundwater withdrawal that is sustainable.