Children who command popularity and power at school also enjoy healthier lives as adults compared to those at the low end of the popularity scale, a Swedish shows.
The unusually wide and long-term study, published on Tuesday, covers 14,000 children born in 1953, who were questioned in 1966 when they were 12 or 13 years old and whose health was tracked up to 2003.
The children's place in the social hierarchy was determined by asking them who they most preferred to work with at school.
To assess their health in later life, the study delved into a national databank for hospital admissions.
Individuals who had been marginalized at school were nine times likelier to develop heart disease and four times likelier to require hospital care for diabetes, which are lifestyle-related disorders.
They were also twice at risk of developing mental ill health and behavioural problems, including self harm and attempted suicide, compared with "top dog" former classmates.
The pattern was the same for both men and women, although the types of ill health they developed were different.
Importantly, the results cannot be explained by the occupation, income or education of the child's family, according to the paper, published in the Journal of Epidemiology and Community Health.
Peer status at school could play a large and badly overlooked impact on health in later life, suggested Ylva Almquist of Stockholm University's Centre for Health Equity Studies.