Engaging in regular moderate to vigorous physical activity at age 11 was associated with better mental health between the ages of 11 and 13, the study found.
Physical activity was also associated with reduced hyperactivity and behavioural problems, such as loss of temper, fighting with other children, lying, and stealing, in young people.
Researchers from the Universities of Edinburgh, Strathclyde, Bristol, and Georgia in the United States explored data from the Children of the 90s study (also known as the Avon Longitudinal Study of Parents and Children; ALSPAC). They looked at the levels of physical activity of 4755 11-year-olds which was measured using devices.
The devices recorded levels of moderate physical activity -- typically defined as brisk walking or cycling -- as well as vigorous activity which boosts heart rate and breathing, such as aerobic dancing, jogging or swimming.
The young people and their parents reported on their levels of depressive symptoms from age 11 and at age 13 years. Participants' parents and teachers were also quizzed about the young people's general behaviour and emotional difficulties.
In analysing the impact of moderate to vigorous exercise on the young people's mental health and behaviour, the team also considered factors such as age, sex and socio-economic status.
They found that higher levels of moderate or intense physical activity had a small but detectable association with decreases in depressive symptoms and emotional difficulties.
Regular exercise had a small but detectable association with reduced behavioural problems, even after controlling for other possible influences, the study found.
The findings suggest regular moderate and intense physical activity may have a small protective influence on mental health in early adolescence, researchers say.
Dr Josie Booth, of the University of Edinburgh's Moray House School of Education and Sport, said: "This study adds to the increasing evidence base about how important physical activity is for all aspects of young people's development -- it can help them feel better, and do better at school. Supporting young people to lead healthy active lives should be prioritised."
Researchers say the study is the first to offer such a comprehensive approach to examining mental health and exercise in young people.
Professor John Reilly, at the University of Strathclyde, said: "While it might seem obvious that physical activity improves mental health the evidence for such a benefit in children and young people has been scarce, so the study findings are important. The findings are also important because levels of moderate-to-vigorous intensity activity globally are so low in pre-teens globally -- less than a third achieve the 60 minutes per day recommended by the WHO and UK Health Departments."
The study is published in Mental Health and Physical Activity.
The research was funded by the Bupa Foundation. Researchers used data from the Children of the 90s study, also known as the ALSPAC birth cohort, based at the University of Bristol. The study is a long-term health-research project that enrolled more than 14,000 pregnant women in 1991 and 1992.
Children of the 90s has been following the health and development of the parents and their children in detail and is currently recruiting the children and the siblings of the original children into the study. It receives core funding from the Medical Research Council, the Wellcome Trust and the University of Bristol.