Studies of phenotypic selection in natural populations often concentrate only on short time periods and do not quantify selection intensities. We quantified temporal and microspatial variation in the intensities of natural and sexual selection for body size in the yellow dung fly over 2 years. Female fecundity selection intensity remained approximately constant over the season with an overall mean ± SE of 0.187 ± 0.014. Selection intensity for male reproductive success, defined as eggs obtained by mating males, did not differ from zero, indicating there was no assortative mating by size. Sexual selection intensity for male mating success favouring large males was variable but overall strong in the two years (0.499 ± 0.053 and 0.510 ± 0.051). As theoretically expected for male–male competition, sexual selection intensity increased with competitor density and reached an asymptote at about 250 males per pat; it also decreased with time in spring and increased again in autumn as a function of density. Small males had the best chance of obtaining a female at very low male densities. Greater selection intensity for large size in males than females is consistent with, and might be responsible for, the observed sexual size dimorphism in this species, as males are larger. The seasonal pattern of mean male body size (smallest at the beginning and end of the season) most likely reflects mere environmental (primarily temperature) influences on phenotypic size.