Most mathematical models of sexually transmitted infections (STIs) assume that infected individuals become susceptible to re-infection immediately after recovery. This paper assesses whether extending the standard model to allow for temporary immunity after recovery improves the correspondence between observed and modelled levels of STI prevalence in South Africa, for gonorrhoea, chlamydial infection and trichomoniasis. Five different models of immunity and symptom resolution were defined, and each model fitted to South African STI prevalence data. The models were compared in terms of Bayes factors, which show that in the case of gonorrhoea and chlamydial infection, models that allow for immunity provide a significantly better fit to STI prevalence data than models that do not allow for immunity. For all three STIs, estimates of the impact of changes in STI treatment and sexual behaviour are significantly lower in models that allow for immunity. Mathematical models that do not allow for immunity could therefore overestimate the effectiveness of STI interventions.