Previous theoretical studies of the evolution of the selfing rate have shown that mixed mating systems are not evolutionary stable states. Such models have, however, not included the effects of population structure and thus biparental inbreeding together with the evolution of selfing rates and inbreeding depression. In order to examine selection on selfing rates in structured populations, a stochastic model simulating a finite population with partial selfing and restricted pollen and seed dispersal has been developed. Selection on the mating system was followed by introducing modifiers affecting the selfing rate. The major result was that, with density dependent recruitment, a process which maintains the population structure necessary for biparental inbreeding to occur, a mixed mating system could be maintained. This result was associated with an increase of the mutation load with high selfing rates, and the selected selfing rate depended on the degree of population structure rather than on the initial selfing rate. With low dominance of deleterious alleles, complete allogamy can be selected for. Further studies showed that the more general condition of spatial heterogeneity of recruitment can lead to similar results, the most important condition being the maintenance of genetic structure within populations. A brief survey of the empirical literature shows that a positive relationship between the magnitude of inbreeding depression and the inbreeding coefficient within populations has been observed, in support of the present model.