 The molecular data is supported by the discovery of Pakicetus , the earliest archaeocete . The skeletons of Pakicetus show that whales did not derive directly from mesonychids . Instead , they are artiodactyls that began to take to the water soon after artiodactyls split from mesonychids . Archaeocetes retained aspects of their mesonychid ancestry ( such as the triangular teeth ) which modern artiodactyls , and modern whales , have lost . The earliest ancestors of all hoofed mammals were probably at least partly carnivorous or scavengers , and today 's artiodactyls and perissodactyls became herbivores later in their evolution . Whales , however , retained their carnivorous diet because prey was more available and they needed higher caloric content in order to live as marine endotherms ( warm @-@ blooded ) . Mesonychids also became specialized carnivores , but this was likely a disadvantage because large prey was uncommon . This may be why they were out @-@ competed by better @-@ adapted animals like the creodonts and later Carnivora . 
