Natural selection favours individuals who maximise their own reproductive success and that of their close relatives. From this perspective, cooperation that benefits individuals of a different species represents an evolutionary conundrum. The theory of mutualism seeks to resolve this puzzle, and it posits that there must be downstream benefits to cooperators that offset any costs inherently associated with interspecific cooperation. Thus, individuals should only further the survival and fecundity of their interspecific partners if this generates additional return benefits, such as food, shelter or protection. A major challenge for the evolution of mutualism is when the ecological niches of partner species overlap, as this creates a tension between the benefits of exchanging services and the costs of competing for shared resources. Here we study the extent to which niche expansion, in which cooperation augments the common pool of resources, can resolve this problem. We find that niche expansion facilitates the evolution of mutualism, especially when populations are at high densities. Further, we show that niche expansion can promote the evolution of reproductive restraint, in which a focal species adaptively sacrifices its own growth rate to increase the density of partner species. We interpret these results in the context of microbial community interactions, which are often characterized by yieldenhancing exchanges of nutrients, termed 'cross-feeding'. Our findings suggest that yieldenhancing mutualisms are more prevalent in stable habitats with a constant supply of resources, where populations typically live at high densities, but such mutualisms are particularly vulnerable to the emergence of cheats. In general, our findings highlight the need to integrate both temporal and spatial dynamics in the analysis of mutualisms.Keywords -demography, ecology, mutualism, cross-feeding, kin selection, spatial structure. al. 2016) and among partner species engineered (Shou et al. 2007, Wintermute and Silver 2010, Mee et al. 2014) and evolved in the lab (Harcombe 2010, Pande et al. 2014, Harcombe et al. 2018). These examples pose the question of whether costly microbial mutualisms are more widespread and awaiting discovery. To approach this question, we ask what ecological conditionsare most likely to support these mutualistic investments?Microbial cells release compounds into their environment that are then used by other members of the community for survival and growth Brown 2015, Estrela et al. 2019). In some cases (termed cross-feeding or syntrophy), these exo-molecules are a waste product of an individual's metabolism that is advantageously co-opted by a partner species (Hillesland and Stahl 2010, Estrela et al. 2012, LaSarre et al. 2017, Goldford et al. 2018, and as such, it comes at no cost to the producer. More challenging for evolutionary theory is when the exchanged compounds are not simple metabolic waste products but specifically designed costly secretions, such as the secretion of nutrient-scavenging molecules ...