Natural selection may act in different directions during different life-history stages, or in different directions on different classes of individuals. Antagonistic selection of this kind may be an important mechanism by which additive genetic variation for quantitative traits is maintained, and can prevent populations or species reaching local adaptive peaks. This paper reports the results of a study of viability selection on morphological traits of nestling collared flycatchers Ficedula albicollis. Analyses performed without knowledge of the sex of nestlings suggested that no selection was occurring on these traits. However, using molecular sex identification with the avian CHD gene, it is shown that selection acts in different directions on male and female body size from fledging to breeding, apparently favouring relatively small males and large females. The results suggest that differential selection on male and female nestlings may contribute to purely phenotypic sexual size dimorphism in this species. These findings highlight the potential of newly developed molecular sexing techniques to reveal the consequences of an individual's gender for many aspects of its life history in taxa where gender cannot be determined on the basis of external appearance.