“It’s a substantial amount of calories, and it did translate over a relatively short period of time into some substantial weight and body fat changes,” said Kevin Hall, the lead author of the study and an obesity expert at the National Institute of Diabetes and Digestive and Kidney Diseases. “I was surprised by the magnitude of the changes we saw.”

Barry Popkin, a global obesity and nutrition expert at the University of North Carolina at Chapel Hill who was not involved in the study, called the research impressive and said that the weight gained on the ultra-processed diet in a short period of time was “profound.” He said that the new findings, along with previous studies, raise questions about whether food manufacturers can create healthier processed foods that do not induce people to overeat.

“This is a very important study and a major challenge to the global food industry and the food science profession,” Dr. Popkin said.

The new study, the first clinical trial to directly compare how ultra-processed foods and unprocessed foods influence health, could have important implications. Ultra-processed foods make up more than half of the calories that Americans consume, and they are becoming increasingly widespread across the globe as multinational food companies push deeper into developing countries.

While there are many ways to define ultra-processed foods, they are typically packaged or fast foods that contain many ingredients, such as added sugars, refined carbohydrates, industrial oils, sodium and synthetic flavors and preservatives. Observational studies of thousands of people have found that eating high amounts of these foods is associated with a greater likelihood of early death from heart disease and cancer.

But people in lower socioeconomic brackets tend to consume the most ultra-processed foods. They also tend to smoke more, exercise less and engage in other unhealthy behaviors. As a result, large population studies cannot entirely separate the effects of eating ultra-processed foods from other lifestyle factors that influence disease risk.

The new study was designed to get around this problem by recruiting h ealthy adult s whose average age was 31 and assigning them to eat both an unprocessed and an ultra-processed diet. The number of people in the study was necessarily small — 20 men and women — because the subjects had to spend four weeks living in a research facility eating only their prescribed diets. The researchers prepared all their meals and snacks, tracked every morsel of food that they ate, and carefully analyzed the effects of those foods on their weight, body fat, hormones and other biomarkers.