Exercise is linked to a reduced risk of seven types of cancer, and the more physical activity the better, according to a study published Thursday.

The study, in the Journal of Clinical Oncology, looked at whether meeting the recommended physical activity guidelines had an effect on cancer risk.

In general, healthy adults are encouraged to engage in 2.5 to 5 hours a week of moderate-intensity activity, such as brisk walking or gardening. Alternatively, up to 2.5 hours of vigorous activity — jogging, running, swimming laps, jumping rope or hiking — are recommended.

These "guidelines have largely been based on their impact on chronic diseases like cardiovascular disease and diabetes," Alpa Patel, senior scientific director of epidemiology research at the American Cancer Society, said in a statement.

"These data provide strong support that these recommended levels are important to cancer prevention, as well," she said.

The study, from researchers at the American Cancer Society, National Cancer Institute and Harvard T.H. Chan School of Public Health, pooled data from nine studies, involving more than 755,000 adults.

Participants reported their leisure-time physical activity, and were followed for a decade, on average, to see if they developed 15 different types of cancer.

Meeting or exceeding the recommended guidelines goals was linked to a reduced risk of seven of those cancers. Among both men and women, the risk of kidney cancer was reduced by up to 17 percent, liver cancer by up to 27 percent and myeloma by up to 19 percent.

Among men, increased exercise was linked to up to a 14 percent reduced risk for colon cancer. Among women, more physical activity was associated with up to a 10 percent lower risk for breast cancer and up to an 18 percent lower risk of both endometrial cancer non-Hodgkin lymphoma.

The study was observational, and the findings do not prove cause and effect. Indeed, it's possible people who exercise more also engage in other healthy lifestyle behaviors that may influence cancer risk.

But evidence is growing that physical activity may directly affect tumor growth: A 2016 study from the National Cancer Institute found people who exercised the most also had lower odds of developing cancers of the bladder, esophagus, lung, rectum and stomach.

Exercise also helps protect against other diseases, including heart disease and type 2 diabetes, and has been shown to improve mood and sleep.

But most people aren't meeting their exercise requirements. Less than a quarter of American adults get the recommended amount of physical activity each week.

Follow NBC HEALTH on Twitter & Facebook.