BACKGROUND: Rural areas in the Southern hemisphere bear the brunt of inadequate sanitation services and high prevalence of open defecation. Our study in an Indonesian remote village underscores the critical role of psychosocial factors influencing sanitation behavior in such marginalised communities. This study explores contextual and RANAS (Risk, Attitudes, Norms, Abilities, and Self-regulation) psychosocial factors determining sanitation behaviour in rural Indonesia. METHODS: In a cross-sectional survey of 371 rural households, we gathered data on personal characteristics, sanitation behaviours, and RANAS factors and performed regression analysis. RESULTS: We found that most respondents do not use the toilet regularly, and no household has safely managed sanitation facilities. Among all contextual factors, households with equal power in determining household expenses between husbands and wives and households with access to hygiene information tend to practice better sanitation behaviours and latrine use. Meanwhile, RANAS factors that primarily affect sanitation behaviour in this study are remembering (part of self-regulation, OR = 0.35), followed by feeling (attitude, OR = 0.31) and commitment (self-regulation, OR = 0.18). CONCLUSIONS: One in every four people interviewed in rural Luwu practices open defecation and no household has access to safely managed sanitation. In reducing open defecation rate in rural areas of Indonesia, the government should strengthen their efforts and concentrate on programmes that address the three identified psychosocial variables, along with improving access. While many studies on the determinants of sanitation behaviours in LMICs analyse contextual factors only, we argue that Indonesian sanitation behavioural interventions should use the RANAS model to identify psychosocial factors.