NEW YORK — Extinct human relatives known as Homo erectus cooked and prepared their foods, paving the way for long-term survival, a study suggests.

By studying remains and DNA extracted from fossils of hominins like Homo erectus and those of nonhuman primates, Harvard University researchers found that the ancestors of humans were avoiding raw meat and consuming cooked foods.

Had they not taken that step, humans would be spending almost half of their time eating and would have missed a major evolutionary advancement that allowed them to live longer, according to the report, published Monday in the Proceedings of the National Academy of Sciences.

“We now know the tradition of food preparation has a very long history that predates the history of modern humans,” the study’s lead author, Chris Organ, said in an interview. “It’s during this time that you see some massive evolutionary shifts in the human body.”

Through analysis of body size, DNA and tooth sizes of primates, modern humans and 14 hominin species, the researchers found that the efforts of Homo erectus led to the evolution of small molars and stomachs in modern humans. Raw foods were softened with fire and tools by Homo erectus for easier consumption and reduced eating time, the report said.

Without that advancement, humans would spend 48 percent of their time eating, like ordinary primates do, and wouldn’t have had time to evolve in other areas, researchers said.

“Our bodies have adapted to eating cooked food, and now our bodies rely on it to survive,” said Organ, a researcher at Harvard in Cambridge, Mass. “If all you had to eat was wild food, you’d lose so much weight that long-term survival like that is not feasible.”

Homo erectus lived 70,000 to 1.8 million years ago in Africa and Asia, according to the Smithsonian National Museum of Natural History.

They are the first species known to have modern human-like body proportions with longer legs and shorter arms relative to their torso, according to the museum’s website.

While the advancement pushed the evolutionary needle in the favor of humans, it may have indirectly led to drawbacks today, Organ said.

“We’ve gotten so good at hyper-processing food that it’s part of our problem with obesity,” he said. “You can extract many more calories out of very hyper-processed food.”