The operation of sexual selection depends on ecological conditions. Thus, changes in environmental conditions because of human activities can alter the strength and direction of sexual selection, with implications for evolutionary trajectories and the viability of populations. We show that aquatic algal blooms can relax the operation of sexual selection by influencing which males are available to attract females. This is by influencing the ability of males to maintain a resource needed in mate attraction. When we exposed two competing threespine stickleback males Gasterosteus aculeatus, whose attractiveness to females was known, to either clear or algal‐turbid water, nest abandonment was more common in clear water, and it was usually the unattractive male that abandoned his nest. In turbid water, on the other hand, nest abandonments were less common and when they occurred, the probability increased that the attractive male abandoned his nest, and that the unattractive male subsequently occupied it. This change in the composition of nesting males increased the mating success of unattractive males. Thus, our results reveal a new mechanism through which habitat deterioration can influence sexual selection, by altering success in the competition for a resource critical in mate attraction, a territory with a nest in this case. This could be a common mechanism, considering the prevalence of resource competition in mate choice systems. On a broader level, our results emphasise the importance of considering the impact of environmental changes on the outcome of resource competition when investigating the influence that environmental disturbances have on the operation of sexual selection and thereby on evolutionary processes and population dynamics.