Communication in caterpillars evolved from the simple act of walking, according to scientists.
A team, writing in the journal Nature Communications, report that hair-like structures that the creatures use to make sound evolved from legs.
The team studied the masked birch caterpillar which uses these structures to communicate its ownership of a leaf.
This means the caterpillar is able to "tell" an intruder to go away without risking injury in a conflict.
"These are really interesting caterpillars," said Dr Jayne Yack from Carleton University in Ottawa, Canada, who led the research. "They make complex vibratory signals using hair-like structures on their 'bum' segment."
The caterpillars drag these structures across the leaf when an intruder enters their "leaf shelter" to make a scraping sound.
"When they make this signal, the intruder leaves," explained Dr Yack. "It's like saying, I'm here, get out of here - I already own this leaf."
The scientists looked at other species within the same group of caterpillars and created a "molecular family tree" of the creatures.
They used chemical markers to work out the relationship between the animals, revealing which in the group were the more ancient or "basal" species and which species evolved more recently or were "derived".
"Those more basal species actually didn't have these sound-producing structures. [In their place], they had legs that they used to walk towards an intruder," said Dr Yack.
These more ancient or basal species, she explained, walk towards intruders and try to attack them.
"They can kill each other in these confrontations," Dr Yack added.
She said that the evolution of the scraping display had allowed the caterpillars to resolve their conflicts without fighting.
"So our idea is that these ritualised signals actually prevent damage to both contestants - they resolve conflicts in a more 'civilised' way."
The study provides an illustration of an evolutionary path that many other biologists are exploring.
"Foot drumming in kangaroo rats and pawing the ground in in bulls are [communication signals] thought to have evolved from the intention to chase," the scientists wrote in their article.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.