Global warming shrank certain animals in the ancient past, and scientists worry it could happen again.

Warm-blooded animals got smaller at least twice in Earth’s history when carbon dioxide levels soared and temperatures spiked as part of a natural warming, a new study says.

University of New Hampshire researcher Abigail D’Ambrosia warned that mammals — but not people — could shrivel in the future under even faster man-made warming.

Get Breaking News Delivered to Your Inbox

“It’s something we need to keep an eye out for,” said D’Ambrosia, who led the new work. “The question is how fast are we going to see these changes.”

Three different species shrank noticeably about 54 million years ago when the planet suddenly heated up. One of them — an early, compact horse — got 14 percent smaller, going from about 17 pounds to 14.6 pounds, according to an analysis of fossil teeth in Wednesday’s journal Science Advances .

“These guys were probably about the size of maybe a dog, then they dwarfed,” said D’Ambrosia. “They may have gone down to the size of a cat.”

Another creature that contracted was a lemur-like animal that’s the earliest known primate. It shrank about 4 percent; while it may not seem like much, it’s noticeable because studies of the animal over millions of years showed it was usually getting bigger over time, D’Ambrosia said.

Previous studies have documented a similar shrinking of mammals, including another early horse ancestor, during an earlier warming about 56 million years ago. Scientists and farmers have also long tracked animals, such as cows, that shrink and give less milk during hotter stretches.

This latest work shows heating and shrinking are connected over millions of years.

“These results are very significant because they provide another independent test of whether climate drives changes in body size in mammals,” said Jonathan Bloch, curator of vertebrate paleontology at the Florida Museum of Natural History, who wasn’t part of the study. “If we start to see patterns repeat themselves, we can learn from that. And what we learn from these lessons will certainly be important as we think about the possible response of plants and animals to future climate change.”

Both D’Ambrosia’s study and that of the earlier warming are based on fossils recovered from the Bighorn Basin of Wyoming. D’Ambrosia said it’s unlikely that the shrinking only happened there.

In hotter climates, mammals and other warm-blooded animals need to shed heat so they shrink. Smaller animals have more skin — or fur — per pound than bigger animals so more heat can escape, making them better adapted for warmer climate. Larger animals do better in the cold because they have less skin per pound and keep their heat.

The bigger natural warming — 56 million years ago — saw temperatures rise 9 degrees or more probably from giant belches of methane from dead plants and animals that had accumulated on the sea floor, said Princeton University climate scientist Michael Oppenheimer.