1. In most stochastic models addressing the persistence of small populations, environmental noise is included by imposing a synchronized effect of the environment on all individuals. However, buffer mechanisms are likely to exist that may counteract this synchronization to some degree. 2. We have studied whether the flexibility in the mating system, which has been observed in some bird species, is a potential mechanism counteracting the synchronization of environmental fluctuations. Our study organism is the lesser spotted woodpecker Picoides minor (Linnaeus), a generally monogamous species. However, facultative polyandry, where one female mates with two males with separate nests, was observed in years with male-biased sex ratio. 3. We constructed an individual-based model from data and observations of a population in Taunus, Germany. We tested the impact of three behavioural scenarios on population persistence: (1) strict monogamy; (2) polyandry without costs; and (3) polyandry assuming costs in terms of lower survival and reproductive success for secondary males. We assumed that polyandry occurs only in years with male-biased sex ratio and only for females with favourable breeding conditions. 4. Even low rates of polyandry had a strong positive effect on population persistence. The increase of persistence with carrying capacity was slower in the monogamous scenario, indicating strong environmental noise. In the polyandrous scenarios, the increase of persistence was stronger, indicating a buffer mechanism. In the polyandrous scenarios, populations had a higher mean population size, a lower variation in number of individuals, and recovered faster after a population breakdown. Presuming a realistic polyandry rate and costs for polyandry, there was still a strong effect of polyandry on persistence. 5. The results show that polyandry and in general flexibility in mating systems is a buffer mechanism that can significantly reduce the impact of environmental and demographic noise in small populations. Consequently, we suggest that even behaviour that seems to be exceptional should be considered explicitly when predicting the persistence of populations.