This study employed the Spatial Autoregressive (SAR) model and the Robust Spatial Autoregressive (RSAR) model to analyse the prevalence of stunting among children under five in Indonesia, accounting for both spatial dependence among provinces and the presence of spatial outliers. The study utilised secondary data for 2024 covering all 38 provinces of Indonesia. Stunting prevalence was used as the response variable, while eight explanatory variables were considered: exclusive breastfeeding coverage, complete basic immunisation coverage, access to adequate sanitation, access to clean water, the proportion of the population living below the poverty line, adequate housing, early marriage prevalence, and family planning participation. The analysis began with the construction of a spatial weight matrix using the K-Nearest Neighbour (KNN) approach, followed by the assessment of spatial autocorrelation using Moran’s I. Subsequently, Ordinary Least Squares (OLS) regression was performed, followed by spatial effect testing using the Lagrange Multiplier test, SAR modelling, detection of spatial outliers through Moran’s scatterplot analysis, and RSAR modelling using the MM-estimation approach. The results revealed significant positive spatial autocorrelation in stunting prevalence across Indonesian provinces, indicating that stunting conditions in a province are associated with those of neighbouring provinces. The SAR model identified exclusive breastfeeding coverage, complete basic immunisation coverage, the proportion of the population living below the poverty line, and early marriage prevalence as significant determinants of stunting prevalence. In contrast, the RSAR model identified five significant factors: exclusive breastfeeding coverage, complete basic immunisation coverage, access to adequate sanitation, the proportion of the population living below the poverty line, and early marriage prevalence. The significance of adequate sanitation emerged after the influence of spatial outliers had been reduced through robust estimation. In terms of model performance, the RSAR model achieved an AIC value of 130.41. Furthermore, the residuals of the RSAR model exhibited no significant spatial autocorrelation, as indicated by a Moran’s I value of 0.0551 (p = 0.1202). These findings suggest that the RSAR model provides a more reliable representation of the factors influencing stunting prevalence in Indonesia, as it effectively accounts for spatial dependence while reducing the impact of spatial outliers.