A recent study published in the Royal Society Open Science has shed light on how the long neck of the modern-day giraffe evolved, according to Business Standard. The researchers studied 71 fossils belonging to nine extinct species of early giraffes, and conducted a comparison to two common living species in the giraffe family, according to the Daily Mail.

The study marks the first time that scientists have made a strong effort to compare the necks of giraffes to those of their relatives and how they changed over time, according to Live Science.

"We wanted to figure out how the giraffe got its long neck because we know that its ancestors had a shorter neck," said Nikos Solounias, a giraffe anatomy expert and paleontologist.

The study shows that its evolution took place in several stages, beginning with one of the animal's neck vertebrae stretching towards the head and then toward the tail millions of years later. Furthermore, rather than a consistent stretching over a long period of time, the necks of giraffe ancestors grew in stages that were separated by millions of years.

"It's interesting to note that that the lengthening was not consistent," said Solounias. "First, only the front portion of the C3 vertebra lengthened in one group of species. The second stage was the elongation of the back portion of the C3 neck vertebra."

The lengthening of the neck was a beneficial evolutionary adaptation that allowed giraffes to obtain vegetables high above the ground in the African savanna.