An artist's rendering shows the South American native ungulate Macrauchenia patachonica which had a number of remarkable adaptations, including the positioning of its nostrils high on its head in this illustration released on March 17, 2015. REUTERS/Peter Schouten/Handout

To 19th century British naturalist Charles Darwin, they were the strangest animals yet discovered, one looking like a hybrid of a hippo, rhino and rodent and another resembling a humpless camel with an elephant’s trunk.

Ever since Darwin first collected their fossils about 180 years ago, scientists had been baffled about where these odd South American beasts that went extinct just 10,000 years ago fit on the mammal family tree. The mystery has now been solved.

Researchers said on Wednesday a sophisticated biochemical analysis of bone collagen extracted from fossils of the two mammals, Toxodon and Macrauchenia, demonstrated that they were related to the group that includes horses, tapirs and rhinos.

Some scientists previously thought the two herbivorous mammals, the last of a successful group called South American ungulates, were related to mammals of African origin like elephants and aardvarks or other South American mammals like armadillos and sloths.

“We have resolved one of the last unresolved major problems in mammalian evolution: the origins of the South American native ungulates,” said molecular evolutionary biologist Ian Barnes of London’s Natural History Museum, whose research appears in the journal Nature.

Toxodon, about 9 feet long (2.75 meters), possessed a body like a rhinoceros, head like a hippopotamus and ever-growing molars like a rodent. Macrauchenia, just as long but more lightly built, had long legs, an extended neck and apparently a small trunk.

“Some of Darwin’s earliest thoughts about evolution by means of natural selection were engendered by contemplating the remains of Toxodon and Macrauchenia, which resembled so confusingly the features of a number of other groups, but had died out so recently,” said paleomammalogist Ross MacPhee of New York’s American Museum of Natural History.

The researchers tried but failed to get DNA from the fossils, but were able to coax the longer-lasting collagen from the remains. Collagen is the main structural protein in various types of tissues, including bone and skin.

The scientists compared the collagen to a wide range of living and a few extinct mammals to properly place the creatures on the mammal family tree.

MacPhee said this group most likely entered South America from North America at about the time the dinosaurs were wiped out 65 million years ago in a calamity that enabled mammals to become Earth’s dominant land animals.

An eclectic array of mammals including elephant-sized ground sloths and saber-toothed marsupials arose in South America.