Summary. A stochastic discrete time version of the susceptible–infected–recovered model for infectious diseases is developed. Disease is transmitted within and between communities when infected and susceptible individuals interact. Markov chain Monte Carlo methods are used to make inference about these unobserved populations and the unknown parameters of interest. The algorithm is designed specifically for modelling time series of reported measles cases although it can be adapted for other infectious diseases with permanent immunity. The application to observed measles incidence series motivates extensions to incorporate age structure as well as spatial epidemic coupling between communities.