Although bubonic plague is an endemic zoonosis in many countries around the world, the factors responsible for the persistence of this highly virulent disease remain poorly known. Classically, the endemic persistence of plague is suspected to be due to the coexistence of plague resistant and plague susceptible rodents in natural foci, and/or to a metapopulation structure of reservoirs. Here, we test separately the effect of each of these factors on the long-term persistence of plague. We analyse the dynamics and equilibria of a model of plague propagation, consistent with plague ecology in Madagascar, a major focus where this disease is endemic since the 1920s in central highlands. By combining deterministic and stochastic analyses of this model, and including sensitivity analyses, we show that (i) endemicity is favoured by intermediate host population sizes, (ii) in large host populations, the presence of resistant rats is sufficient to explain long-term persistence of plague, and (iii) the metapopulation structure of susceptible host populations alone can also account for plague endemicity, thanks to both subdivision and the subsequent reduction in the size of subpopulations, and extinction-recolonization dynamics of the disease. In the light of these results, we suggest scenarios to explain the localized presence of plague in Madagascar.