Groundwater is crucial for meeting the water needs of rural communities, serving both domestic and agricultural purposes. However, its quality in our study area remains unclear. Therefore, the primary objective of the current study is to evaluate the groundwater quality and ascertain the level of contamination risk associated with the use of septic tanks in rural communities within the Al Hoceima province. This will be achieved by conducting a comprehensive analysis of physicochemical parameters and employing effective indices, including the Water Quality Index (WQI), Nitrate Pollution Index (NPI), and Chronic Health Risk (CHR). In February 2023, we collected samples from 33 wells, spanning densely and sparsely populated regions, to account for potential variations in water quality. The analyzed parameters included pH, total dissolved solids (TDS), electrical conductivity (EC), ammonium (NH 4 + ), nitrates (NO 3 -), nitrites (NO 2 -), sodium (Na + ), potassium (K + ), calcium (Ca 2+ ), magnesium (Mg 2+ ), chloride (Cl -), sulfate (SO 4 2-), bicarbonate (HCO 3 -), phosphate (PO 4 3-), and silica (SiO 2 ). Our findings revealed slightly alkaline groundwater with TDS levels ranging from 1508.63 mg/l to 8289.8 mg/l, with an average of 3223.19 mg/l. The cation dominance sequence observed was Na + > Ca 2+ > Mg 2+ > K + > NH 4 + , while for anions, it followed as SO 4 2-> Cl -> HCO 3 -> NO 3 -> PO 4 3-> NO 2 -. The Water Quality Index (WQI) indicated contamination in 54.55% of the wells, with notably higher NPI values in densely populated regions. This suggests anthropogenic nitrate contamination, likely originating from septic tanks. The assessment of Chronic Health Risk (CHR) revealed non-carcinogenic health risks in 27.27% of samples for children and 15.15% for adults. Given these findings, it is imperative for Moroccan authorities, despite the efforts of the Loukkos Hydraulic Basin Agency (LHBA), to implement strategic measures to protect groundwater quality in densely populated rural regions.