A study in the United States has found that people who exercise several times a week report having better mental health than those who take no exercise.
The research also found that more exercise was not always better for psychological well-being, with people who exercise every day reporting lower levels of mental health.
Exercising for around 45 minutes three to five times a week was associated with the biggest benefits, according to results of the study published in The Lancet Psychiatry journal.
The study included all types of physical activity, ranging from childcare, housework, lawn-mowing and fishing to cycling, going to the gym, running and skiing.
Exercise is known to bring health benefits by reducing the risk of illnesses such as heart disease, stroke and diabetes, but its links with mental health were less clear.
Some evidence suggests exercise may improve mental health, but experts note that the relationship could go both ways, with inactivity being both a symptom of, and contributor to, poor mental health.
In this study, while the links between regular exercise and better mental health were clear, the researchers said they could not show cause and effect.
The research used data from 1.2 million adults across all 50 US states who had been asked to estimate how often in the past 30 days they would rate their mental health as "not good" based on stress, depression and emotional problems.
They were also asked how often they had exercised in the past 30 days outside of their regular job, as well as how many times a week or month they did this exercise and for how long.
The results were adjusted for age, race, gender, marital status, income, education, employment status, body mass, self-reported physical health and previous diagnosis of depression.
On average, participants had 3.4 days of poor mental health a month, the results showed.
But compared to people who reported doing no exercise, people who exercised reported 1.5 fewer days of poor mental health a month – a reduction of 43%.
Among the 75 types of exercise recorded, all types were linked with better mental health.
The strongest associations were seen for team sports, cycling, aerobic and gym exercise.