They were big, hairy and freaky-looking, and now we know much more about the world that giant ground sloths lived in 27,000 years ago, a new study reports.

It's all thanks to the discovery of fossils from one of the creatures, which were recently found in a water-filled sinkhole in Central America.

The sloth died deep in that sinkhole, and its remains laid undisturbed until 2014. That's when divers found parts of a tooth and other bones while searching for ancient Maya artifacts in the pool, located in Cara Blanca, central Belize.

Studying the fossils allowed researchers to travel "back in time," revealing what the animal ate and also about the climate and environment it lived in – and possibly why the species went extinct.

By analyzing the 4-inch-long tooth fragment, which spanned more than a year of tooth growth, scientists were able to recreate a year in the life of the sloth.

The analysis revealed that the giant sloth lived through a long dry season, which lasted about seven months, sandwiched between two short rainy seasons. It also revealed that the creature, which could grow to up to 12 feet tall, lived in a savanna, rather than a forest, and consumed a variety of plants that differed between wet and dry seasons.

Belize at that time was arid and barren, not at all like the jungle it is today.

Though the beasts were herbivores, they still had a varied diet, eating different foods depending on how dry or wet it was. "We were able to see that this huge, social creature was able to adapt rather readily to the dry climate, shifting its subsistence to relying upon what was more available or palatable," said study lead author Jean T. Larmon, a University of Illinois graduate student in anthropology.

More:Giant sloths with wolverine-like claws used to roam America, and humans hunted them

"This supports the idea that the sloths had a diverse diet," said study co-author Lisa Lucero, also of the University of Illinois, who studies the ancient Maya of central Belize. "That helps explain why they were so widespread and why they lasted so long. It's likely because they were highly adaptable."

The new findings also "add to the evidence that many factors, in addition to a changing climate, contributed to their extinction in the Americas," added Lucero. "One of those potential factors is the arrival of humans on the scene 12,000 to 13,000 years ago."

A study last year reported that humans likely hunted the giant ground sloth in the Americas around that time. However, it's still unknown how much of a role humans played in the downfall of the giant sloths.

The study was published Wednesday in the peer-reviewed journal Science Advances.