Why do males exert strong mate choice in some taxa but not others? Theory suggests that mate discrimination will enhance male fitness when encounter rates with potential mates are high, when those potential mates vary in the fitness consequences likely to accrue from an attempted insemination, and when courting one female reduces the male's opportunity to court other females. One widespread form of mate choice involves a trend for males of many ectothermic species to court larger (and thus, more fecund) females. To test whether such preferences are dynamically adjusted to local conditions, we studied male preference for larger females in red-sided garter snakes, Thamnophis sirtalis parietalis, near a communal den in Manitoba, Canada. Courting a small female imposes a high opportunity cost for a male in the centre of the den, because many large and easily located females are nearby. In the surrounding woodland, in contrast, a male that neglects a small female is unlikely to encounter a larger substitute partner. In arena trials, male snakes from the den selected larger females more than did males from the surrounding woodland. Manipulating a den male's exposure to females (none, large, small) for 60 min led males to adjust their criteria for courtship depending upon the sizes of females encountered. Hence, the local environment can modify courtship criteria, with male garter snakes adjusting their mate choice selectivity based upon spatial and temporal factors that affect the opportunity costs of courtship.