First, they placed 40 earthworms into a central chamber, from which extended two identical arms.
The idea was to leave the animals alone, and then to see how many earthworms moved to either arm over a 24-hour period.
Over 30 identical repeats of the trial, the worms preferred to group within one chamber over the other.
"We noted that earthworms moving out of the central chamber influenced the directional choice of other earthworms.
"So our hypothesis was confirmed: a social cue influences earthworm behaviour," says Ms Zirbes.
A second experiment tested how the worms affected each other's behaviour, investigating whether the worms use either chemical signals or touch to decide which chamber to move to.
The researchers placed one worm at the start of a soil-filled maze, with two routes to a food source at the end.
After the worm chose its route to the food, the researchers added a second worm to see if it followed the same route as the first.
Eisenia fetida prefers to move across top soil rather than burrow
However, after repeated trials, the second worms were no more likely to take the same route as their predecessors. This indicated that the worms did not leave a chemical trail behind them that communicated their direction of travel.
Yet if two worms were placed together at the start of the maze, they were more likely to follow one another, suggesting that they used touch to communicate where they were going.
In two-thirds of these trials, the worms followed each other.
"I have observed contact between two earthworms. Sometimes they just cross their bodies and sometimes they maximise contact. Out of soil, earthworms can form balls," says Ms Zirbes.
A modelling study then showed that, by using touch alone, up to 40 earthworms could follow each other in a similar way, explaining how herds of the animals preferred to move together into one chamber in the initial experiments.
"To our knowledge this is the first example of collective orientation in animals based on contact between followers," the researchers wrote in the journal.
"It is also the first one of collective movements of annelids."
The researchers suspect that other earthworm species may behave in a similar way. They now hope to investigate why the animals come together to form herds.
One reason may be that clustering helps the worms protect themselves.
Individual Eisenia fetida earthworms secrete proteins and fluids which have antibacterial properties, potentially deterring soil pathogens.
They also secrete a yellow fluid to deter predatory flatworms.
Gathering into groups may increase the amount of fluids covering the earthworms and hence better protect individuals, the researchers say.