AbstractStochastic optimization is an important tool employed to manage salt intrusion and increased freshwater production in coastal aquifers by estimating the optimum well locations and well operation parameters. In karst aquifers, the shape and location of the caves in the aquifers are often uncertain parameters. Thus, it becomes necessary to take into consideration the uncertainties when optimizing water production from such aquifers. The uncertainty associated with the parameterization of aquifers is often handled by creating several equiprobable realizations of aquifers through stochastic simulations. These realizations jointly describe the uncertainty in the aquifer model and as such are used as a means to manage uncertainty when performing optimization and simulation studies of such aquifers. However, owing to the large number of stochastic realizations often created to describe the uncertainty in an aquifer model, performing optimization under uncertainty becomes computationally expensive. In this paper, we propose a freshwater production optimization strategy that uses two separate clustering strategies to identify a small set of realizations (from the total ensemble of aquifer model realizations) upon which the optimization study can be conducted. In this study, a clustering strategy is adopted to reduce the computational expense associated with conducting the optimization study. The k-means++ algorithm was used as the clustering algorithm, and a modified form of the Darcy model with optimized permeability distribution (DMOPD) was selected as the forward model that describes the flow of fluid in the aquifer. Furthermore, the DMOPD was connected to an advection-dispersion-adsorption equation that describes the transport of salt with the fluid phase. A synthetic aquifer example was used to illustrate the optimization strategy and the results obtained show that the clustering algorithm proves to be a useful tool in selecting representative samples for the optimization case study. Also, the optimization algorithm was found to be a viable tool to limit saltwater intrusion in karstic aquifers while maximizing freshwater recovery.