The giraffe's only living relative is a shy forest animal, the okapi
Giraffes stalk open savanna while okapis hide in the Congo rainforest, and at first glance they look nothing alike. Yet both have long dark tongues, lobed canine teeth and skin-covered horns called ossicones. They are the last survivors of a family that once roamed across Europe, Asia and Africa.
The Giraffidae are cud-chewing, even-toed hoofed mammals closely related to deer and cattle. Only two genera remain, both in sub-Saharan Africa. Giraffa contains somewhere between one and eight species depending on who is counting, with four the usual figure, while Okapia holds just the okapi.
Within the group of ruminants known as Pecora, which also includes deer, musk deer, cattle and antelopes, the giraffes' exact position has long been debated. A recent large genome study suggests their closest living relatives are the pronghorns of North America. The two lineages split in the Early Miocene, during a wave of mammal diversification triggered as a changing climate turned subtropical woodland into open grassland.
Fossils of giraffes and their extinct cousins are plentiful. Several ancient families are thought to form a larger group, the Giraffomorpha. One family, the climacoceratids, shared the giraffids' two-lobed canine; most researchers treat them as a sister group, though an older idea casts them as ancestors of the sivatheres, bulky deer-like giraffoids with branching ossicones. The fossils also show the family was once widespread across Eurasia, far beyond its African refuge today.
Its decline came as deer and cattle relatives spread. By the Pliocene, those groups had pushed giraffids out of many Afro-Eurasian communities. Giraffids carry their young for a long time, whereas deer and bovids breed faster, and that quicker pace may have let them fill more ecological roles as the climate cooled late in the Neogene, a period when both groups were evolving rapidly.
Source: Giraffidae