Researchers at the University of California at Davis have finally discovered that zebras have stripes to keep flies away, according to NBC News.

The research team found evidence that zebras and other horse-related species with stripes live in areas that have lots of bloodsucking insects, NBC reported. The team published their findings in the science journal Nature Communications.

Charles Darwin and Alfred Russel Wallace tried to understand why zebras have stripes 120 years ago, and came up with a number of hypotheses, according to NBC.

They considered that the stripes act as a form of camouflage, or as a pattern to confuse predatory carnivores, NBC reported. They also believed they could be a method of heat management, a social function or a way to avoid flies and other parasites.

"No one knew why zebras have such striking coloration," lead author Tim Caro, UC Davis professor of wildlife biology, said in a statement, according to NBC. "But solving evolutionary conundrums increases our knowledge of the natural world and may spark greater commitment to conserving it."

The research team examined regions that have seven species of zebras, horses and donkeys, and also researched the animals' subspecies and the thickness of their stripes, NBC reported.

They then analyzed a set of variables that included temperature, ranges of large predators, woodland areas and the geographic distribution of tsetse flies and horse flies, which are both bloodsucking parasites, according to NBC.

More than some other animals, zebras need to ward off flies because they cause weight gain, spread disease and lower milk production, NBC reported. Zebras' coats of hair are also thinner than some other animals and are as not protective as those of other species, such as the antelope.