Body size, social setting, and the physical environment can all influence reproductive behaviours, but their interactions are not well understood. Here, we investigated how male body size, male-male competition, and water turbidity influence nest-building behaviour in the sand goby (Pomatoschistus minutus), a marine fish with exclusive paternal care. We found that environmental and social factors affected the nest characteristics of small and large males differently. In particular, association between male size and the level of nest elaboration (i.e. the amount of sand piled on top of the nest) was positive only under clear water conditions. Similarly, male size and nest entrance size were positively associated only in the absence of competition. Such interactions may, in turn, help to explain the persistence of variation in reproductive behaviours, which-due to their importance in offspring survival-are otherwise expected to be under strong balancing selection.