In iteroparous, socially monogamous species, individuals vary in the extent of mate fidelity across breeding attempts, often with important fitness consequences. Numerous studies have demonstrated intrinsic drivers of mate fidelity, notably previous breeding success and parental age. Environmental conditions may also influence mate fidelity, and the habitat-mediated hypothesis predicts that fidelity will be lower when environmental conditions are poor. However, limited testing of this hypothesis has been undertaken in longitudinal studies of single populations. Furthermore, studies have mainly focused on environmental conditions during the breeding season, yet conditions prior to breeding may be important for mate fidelity because this is a critical period for pair bond formation. We investigated the effects of prebreeding environmental conditions (onshore wind component and sea surface temperature) on mate fidelity over a 20-year period in the socially monogamous, iteroparous, long-lived marine bird, the European shag, Gulosus aristotelis. Average fidelity rate varied three- to four-fold between years. Mate fidelity was affected by prebreeding environmental conditions, being lower when onshore winds were more prevalent and sea surface temperature was higher. However, mate fidelity was more strongly affected by intrinsic factors, with higher rates when breeding success in the previous attempt and population density were higher, and among older females and middle-aged males. We found that mate fidelity affected timing of breeding, with faithful pairs laying earlier, and early laying pairs bred more successfully, but there was no independent effect of mate fidelity on breeding success. Our results support the habitat-mediated hypothesis whereby prebreeding environmental conditions affect individual pairing decisions. Given environmental conditions are predicted to change globally, further investigation of their impact on aspects of social behaviour in a range of species is warranted.