Eating a daily handful of nuts can help reduce the risk of dying and at the same time help consumers stay slender.

Harvard University scientists examined data on diets and lifestyles of more than 76,000 women and 42,000 men over a 30-year period, according to a news release.

Study participants had been asked to fill out questionnaires weekly about nut consumption and the number of servings they ate daily. A serving was considered 1 ounce or about the size of a package from a vending machine.

Participants who ate nuts daily were 20 percent less likely to die from any cause over the 30-year period than those who didn’t eat nuts regularly.

The research, published in the New England Journal of Medicine, also showed that regular nut eaters were more slender than those who didn’t eat nuts. The researchers said this finding should help reduce fears that the fat in nuts leads to being overweight.

In addition, the research looked at the protective effects on specific causes of death.

The most obvious benefit was a 29% reduction in deaths from heart disease, according to the release.

The researchers also saw an 11% reduction in the risk of dying from cancer.

Based on the analysis of data, they couldn’t determine whether one type of nut was crucial to the protective effects.

But they did find that the reduction in mortality was similar both for peanuts — a legume or bean relative — and for tree nuts, including walnuts, hazelnuts, almonds, Brazil nuts, cashews, macadamias, pecans, pistachios and pine nuts.

The Harvard study backs up several previous studies that found an association between increased nut consumption and a lower risk of diseases, such as heart disease, type 2 diabetes, colon cancer, gallstones and diverticulitis.

The study was funded in part by the International Tree Nut Council Nutrition Research & Education Foundation.