Social factors hypotheses predict that social segregation between male and female adult ungulates is due to social preferences among same-sex peers and avoidance of the opposite sex, rather than aggregation due to body size dimorphism and differential needs of the sexes. It is suggested that if such social preference/avoidance exists its roots should be early in life. While juvenile ungulate males show social preference for same-sex and same-age peers a few weeks after birth, no studies have confirmed such a phenomenon in juvenile females. In this study we investigated another possible mechanism that would result in an early social preference for same-sex conspecifics among juvenile females: we hypothesized that offspring–mother attachment is stronger for daughters than for sons. Attachment was measured in lambs, Ovis aries, using three characteristics defined initially in children: proximity seeking, distress following separation and exploration in the mother's presence. Lambs were tested at 3 weeks of age in two experimental situations in which they could interact with the mother, a familiar ewe or an unfamiliar ewe. (1) During a choice test between the mother and the familiar ewe, daughters maintained closer proximity with the mother than sons did. During the test without the mother (a familiar versus an unfamiliar ewe) daughters were more distressed than sons were. (2) In an isolation–reunion–separation test, reunion with the mother increased exploratory behaviour more in daughters than in sons. Overall, our results reveal that daughters displayed stronger attachment behaviours and could be more strongly attached to their mother than sons are. Such early preference may be a key factor leading to social preference among females and social segregation between the sexes.