A robotic cockroach can act as a 'pied piper' to its flesh-and-blood counterparts, persuading the real insects to hide in unusual places.
European scientists introduced tiny autonomous robots into an "arena" where cockroaches were allowed to run free.
They wanted to see whether the robots would be accepted by the insects and whether they could influence their collective decision-making process.
The results were reported in the academic journal Science.
The robots - built by Jose Halloy, from the Free University in Brussels, Belgium, and colleagues - do not look at all like cockroaches.
But by covering the robots in filter paper infused with cockroach pheromones, the researchers were able to fool the animals into thinking the automatons were genuine members of their group.
Cockroaches are gregarious insects with a tendency to "self-organise". This means that when unleashed into a space, they settle together in one spot - usually preferring darker shelters where they are available.
The experiments were conducted in a one-metre diameter arena with two shelters, the roofs of which were made from plastic discs covered by red filters. By adding a layer of filters, the scientists could make one shelter darker than the other.
Dr Halloy and his colleagues first programmed the robots to have the same darkness preference as the cockroaches. Then, they programmed them to prefer the lighter shelters.
About 60% of the time, the robots tipped the insect group's preference towards congregating in the lighter shelter.
"On one hand we are very interested in understanding the sociability of animals. On another hand, engineers are very interested in building autonomous systems," said Jose Halloy, of the reasons behind the research.
Daniela Rus, from the Massachusetts Institute of Technology (MIT), US, speculated that the work could have several applications, such as pest control robots that lure insects into traps. Bigger robots built to this general blueprint might one day be used to herd livestock.