Nuts could be the key to keeping slim, according to new research.
Scientists from Harvard University and Harvard Medical School say replacing an unhealthy snack with half a daily serving of nuts could slow weight gain in people as they get older.
Eating more of any type of nut was linked to less long-term weight gain and a lower risk of becoming obese, researchers said.
Walnuts in particular appeared to offer good results and were linked to a 15% lower risk of obesity.
Swapping out snacks such as chocolates, pastries and donuts with half a serving of nuts could prevent weight gain of between 0. 41 and 0.7kg over a four-year period.
Researchers conducted a long-term study which followed 51, 529 male health professionals aged 40 to 75, 121, 700 nurses aged 35 to 55 and 16, 686 aged nurses 24 to 44.
Participants had their weight measured every four years and were asked how often they had eaten nuts. They also had to report their exercise every two years.
The findings, published in the online journal BMJ Nutrition, Prevention and Health, showed increasing nut consumption by half a serving a day was associated with less risk of putting on two or more kilos over a four-year period.
The study took into account changes in diet and lifestyle, including exercise and alcohol intake.
However the researchers say the study is observational so cannot establish cause.
Nuts are full of vitamins, minerals, fiber and healthy unsaturated fats and have previously been associated with better heart health.
A previous study published by Harvard University found that having one serving of nuts a day is associated with a 30% lower risk of heart disease compared with one portion of red meat a day.