• dispersal;
  • facultative behavior;
  • kin selection;
  • obligate behavior;
  • reproductive value;
  • scale of competition

There has been much interest in understanding how demographic factors can mediate social evolution in viscous populations. Here, we examine the impact of heterogeneity in patch quality—that is, the availability of reproductive resources for each breeder—upon the evolution of helping and harming behaviors. We find that, owing to a cancellation of relatedness and kin competition effects, the evolution of obligate and facultative helping and harming is not influenced by the degree of viscosity in populations characterized by either spatial or temporal heterogeneity in patch quality. However, facultative helping and harming may be favored when there is both spatial and temporal heterogeneity in patch quality, with helping and harming being favored in both high-quality and low-quality patches. We highlight the prospect for using kin selection theory to explain within-population variation in social behavior, and point to the need for further theoretical and empirical investigation of this topic.