Why do mutualists perform costly behaviours that benefit individuals of a different species? One of the factors that may stabilize mutualistic interactions is when individuals preferentially reward more mutualistic (beneficial) behaviour and/or punish less mutualistic (more parasitic) behaviour. We develop a model that shows how such sanctions provide a fitness benefit to the individuals that carry them out. Although this approach could be applied to a number of symbioses, we focus on how it could be applied to the legume-rhizobia interaction. Specifically, we demonstrate how plants can be selected to supply preferentially more resources to (or be less likely to senesce) nodules that are fixing more N2 (termed plant sanctions). We have previously argued that appreciable levels of N2 fixation by rhizobia are only likely to be selected for in response to plant sanctions. Therefore, by showing that plant sanctions can also be favoured by natural selection, we are able to provide an explanation for the stability of the plant-legume mutualism.