Within-species sexual segregation is a widespread phenomenon among vertebrates, but its causes remain a topic of much debate. Female avoidance of male coercive mating attempts has the potential to influence the social structure of animal populations, yet it has been largely overlooked as a driver of sexual separation. Indeed, its potential role in long-term structuring of natural populations has not been studied. Here we use a comparative approach to examine the suitability of multiple hypotheses forwarded to account for sexual segregation (i.e., activity budget, predation risk, thermal niche-fecundity, and social factors) as drivers underlying sex-specific habitat use in a monomorphic model vertebrate, the smallspotted catshark, Scyliorhinus canicula. Using this hypothesis-driven approach, we show that year-round sexual habitat segregation in S. canicula can be accounted for directly by female avoidance of male sexual harassment. Long-term electronic tracking reveals that spermstoring female catsharks form daytime refuging aggregations in shallow-water caves (similar to 3.2 m water depth) and undertake nocturnal foraging excursions into deeper water (similar to 25 m) on most nights. In contrast, males occupy deeper, cooler habitat (similar to 18 m) by day and exploit a range of depths nocturnally (1-23 m). Males frequent the locations of shallow-water female refuges, apparently intercepting females for mating when they emerge from, and return to, refuges on foraging excursions. Females partly compensate for higher metabolic costs incurred when refuging in warmer habitat by remaining inactive; however, egg production rates decline in the warmest months, but refuging behavior is not abandoned. Thermal choice experiments confirm that individual females are willing to "pay'' in energy terms to avoid aggressive males and unsolicited male mating attempts. Long-term evasion of sexual harassment influences both the social structure and fecundity of the study population, with females trading off potential injury and unsolicited matings with longer-term fitness. This identifies sexual harassment as a persistent cost to females that can mediate vertebrate population dynamics.