To do so, they fed mice 30 different diets that varied in fat, carbs and protein contents for a three-month period, the equivalent of nine years for humans.
The analysts made over 100,000 measurements of body weight changes and body fat, which was recorded with a micro MRI machine.
After analyzing the results, they found that only fat caused mice to gain excessive weight over a long period of time.
"The result of this enormous study was unequivocal - the only thing that made the mice get fat was eating more fat in their diets," lead author John Speakman said in a statement. "These effects of dietary fat seemed to be because uniquely fat in the diet stimulated the reward centres in the brain, stimulating greater intake."
The scientists said carbs did not have an effect on weight gain. They also said the combination of sugar and fat did not have more impact than fat alone. Furthermore, low amounts of protein did not cause the mice to eat more.
Although they noted that using mice rather than humans was a limitation, they said both species have many similarities in their physiology and metabolism.
“We are never going to do studies where the diets of humans are controlled in the same way for such long periods,” Speakman said. “So the evidence it provides is a good clue to what the effects of different diets are likely to be in humans.”
» RELATED: Lack of sunlight in the winter could cause weight gain