(CNN)Narwhals are known as the "unicorns of the sea," but the reason for the whales' showy tusks has long mystified scientists.
Little was known about the tusk's function because narwhals spend most of their lives hidden underneath the Arctic ice. Researchers have speculated that the tusk, which grows out of the animal's head in a spiral pattern, was used as an environment sensor or to hunt.
Now a new study suggests the true evolutionary purpose of these horns -- which can be 8-feet-long -- has to do with sex: The tusks, the research found, are used by male narwhals to compete for and attract mates, a bit like a peacock's ostentatious feathers or an elk's elaborate antlers.
The researchers examined the measurements of 245 male narwhals living in waters off Greenland over the course of 35 years. They found that the largest male narwhals had disproportionately long tusks.
"Broadly, I'm interested in sexual selection, which is responsible for creating some of the craziest traits in biology," said Zackary Graham, an Arizona State University researcher and an author of the study, in a news release. "As an evolutionary biologist, I try to understand why some animals have these bizarre traits, and why some don't."
In other animals, sexually selected traits often exhibit disproportional growth when comparing individuals of the same age, the study said. Graham and the other researchers compared the growth of the tusk to the narwhal's body size and its tail, or fluke -- a trait that is unlikely to have a sexual function.
"We also predicted that if the narwhal tusk is sexually selected, we expect greater variation in tusk length compared to the variation in fluke width," said Graham.
The results, which published Tuesday in the journal Biology Letters, provide the "strongest evidence to date" that narwhal tusks are sexual signals used to scare off rival males and attract females, the study said.
This is because many sexual traits are highly sensitive to nutrient and body condition, such that only the biggest and strongest individuals can afford the energy to produce extremely large traits, according to the study.
The researchers found that the tusks on the male narwhals with the same body size vary from 1.5 feet to 8.2 feet long, however the fluke (or tail) varies much less, ranging from 1.5 feet to 3-feet long.
"The information that the tusk communicates is simple: 'I am bigger than you,'" said Graham.