Many symbioses have costs and benefits to their hosts that vary with the environmental context, which itself may vary in space. The same symbiont may be a mutualist in one location and a parasite in another. Such spatially conditional mutualisms pose a dilemma for hosts, who might evolve (higher or lower) horizontal or vertical transmission to increase their chances of being infected only where the symbiont is beneficial. To determine how transmission in hosts might evolve, we modeled transmission evolution where the symbiont had a spatially conditional effect on either host lifespan or fecundity. We found that over ecological time, symbionts that affected lifespan but not fecundity led to high frequencies of infected hosts in areas where the symbiont was beneficial and low frequencies elsewhere. In response, hosts evolved increased horizontal transmission only when the symbiont affected lifespan. We also modeled transmission evolution in symbionts, which evolved high horizontal and vertical transmission, indicating a possible host-symbiont conflict over transmission mode. Our results suggest an eco-evolutionary feedback where the component of host fitness affected by a conditionally mutualistic symbiont in turn determines its distribution in the population, and, through this, the transmission mode that evolves.