Since eradication of smallpox, many vaccine-preventable diseases such as measles, polio, and whooping cough have been targeted for global elimination. Despite aggressive vaccination programs, this goal has not been achieved and large outbreaks continue to occur, even in populations in which these diseases were once wiped out. In this study, we investigate the principal reason for recurrent outbreaks by analyzing the dynamics of immunity to measles, acquired by transfer of maternal antibodies, natural infection or vaccination, in both the individual and the population. In particular, we discuss the effect of maternal protection on the incidence of infection, and provide a biological explanation for the alterations in patterns of measles epidemics. The results show that the presence of herd immunity above a critical threshold is paramount in preventing large outbreaks of measles. The maintenance of such immunity, however, may not be achievable only by increasing the vaccination coverage, since it reduces the pathogen circulation and consequent boosting of immunity. This requires a combination of high primary vaccine coverage and timely revaccination for boosting of immunity. Due to its high reproductive number, measles eradication would require vaccine coverage above 95 percent, a target that has so far been difficult to achieve.