In some arid regions, groundwater is the only source of water for human needs, so understanding groundwater potential is essential to ensure its sustainable use. In this study, three machine learning models (Genetic Algorithm for Rule-Set Production (GARP), Quick Unbiased Efficient Statistical Tree (QUEST), and Random Forest (RF)) were applied and verified for spatial prediction of groundwater in a mountain bedrock aquifer in Piranshahr Watershed, Iran. A spring location dataset consisting of 141 springs was prepared by field surveys, and from this three different sample datasets (S1–S3) were randomly generated (70% for training and 30% for validation). A total of 10 groundwater conditioning factors were prepared for modeling, namely slope percent, relative slope position (RSP), plan curvature, altitude, drainage density, slope aspect, topographic wetness index (TWI), terrain ruggedness index (TRI), land use, and lithology. The area under the receiver operating characteristic curve (AUC) and true skill statistic (TSS) were used to evaluate the accuracy of models. The results indicated that all models had excellent goodness-of-fit and predictive performance, but that RF (AUCmean = 0.995, TSSmean = 0.89) and GARP (AUCmean = 0.957, TSSmean = 0.82) outperformed QUEST (AUCmean = 0.949, TSSmean = 0.74). In robustness analysis, RF was slightly more sensitive than GARP and QUEST, making it necessary to consider several random partitioning options for preparing training and validation groups. The outcomes of this study can be useful in sustainable management of groundwater resources in the study region.