At its zenith, the Roman Empire spanned three continents, encircled the Mediterranean, and was home to one-fifth of the planet’s population. The Romans brought roads, bridges, and, perhaps most importantly, sanitation. But a new study of ancient feces casts doubt on just how effective the Roman sanitation system was at improving public health.

“I think it’s a good piece of work,” says Jürg Utzinger, an epidemiologist at the University of Basel in Switzerland who was not involved in the study. “It’s not an easy task, because we’re talking about the examination of fecal material dating back thousands of years ago.”

In terms of sanitation, the Roman Empire seemed to be doing a lot of things right: It had public bathing facilities, public toilets, and ordinances dictating how waste should be disposed of. Rome itself had an impressive sewage system—the famed aqueducts. “In the Roman Empire, where they improved sanitation, I would’ve expected a certain decline in parasitic infections,” Utzinger says.

But that’s not what the new study found. Piers Mitchell, a paleopathologist at the University of Cambridge in the United Kingdom, combed through previous studies from more than 50 archaeological sites around the Mediterranean to get a sense of what parasites were living in and on humans before and after the Romans took over. Many of these studies relied on microscopes and chemical or DNA tests to detect parasites and their eggs in soil from grave sites and public latrines. Mitchell focused his analysis on these sites because they contained fossilized feces, known as coprolites, which may retain parasite eggs and DNA for thousands of years. Using this evidence, he outlined the geographic range of multiple parasites.

Despite the Romans’ sanitation technology, Mitchell found that intestinal parasites like whipworm (Trichuris trichiura), roundworm (Ascaris lumbricoides), and Entamoeba histolytica (the causative agent of dysentery) increased in areas after the Romans showed up. He says he was surprised at first but believes that the increases actually have logical explanations.

Although the Romans were on the cutting edge of sanitation technology, they didn’t yet understand germ theory and they didn’t know much about parasites, either. Historical records show that farmers used human feces collected from towns to fertilize their crops. Parasite eggs can remain alive in feces for a long time and, according to Mitchell, the practice could easily have contributed to the roundworms’ success.

On the other hand, Ann Olga Koloski-Ostrow, the self-professed “Queen of Latrines” and a classical archaeologist at Brandeis University in Waltham, Massachusetts, who was not involved in the study, points out that it’s difficult to know exactly how prevalent the use of human feces as fertilizer actually was during the Roman Empire: “We can just say that in some early farming texts, we know that they’d build the slave toilets over an area where the excrement could be collected and then spread over the crops, but that was just on isolated farms here and there.” However, she also notes that many Romans without access to sewer systems used indoor cesspit toilets as well—often located right next to the kitchen. Whether the waste was used as fertilizer, she says, it’s easy to see how the parasites could’ve ended up in the food.

The new study also identifies bathhouses as a potential hotspot for disease. Although the Romans designed them to promote cleanliness, many of the facilities were poorly maintained and the water was allowed to grow dirty—acquiring a “scum on the surface from human dirt and cosmetics,” Mitchell writes. The warm, moist environment may have provided an ideal breeding ground for parasites.

Mitchell’s analyses, published online today in Parasitology, also shows that the Roman Empire often spread fish tapeworms to conquered regions. “They are about 20 to 25 feet long, and they coil around in the inside of your intestines. People get them from eating raw or undercooked fish,” he explains. The Romans cooked many foods, but they also favored a sauce called garum, which is made by fermenting pieces of fish and various seasonings under the hot sun. Because the sauce is never heated, Mitchell postulates that it may have been an ideal vector for spreading fish tapeworm eggs around the empire. As the empire expanded, it brought along its culinary culture—and its parasites.

The new analysis also shows that head and pubic lice were common throughout the empire, as well as fleas and bedbugs.

But in spite of all this, Koloski-Ostrow says it would be a mistake to write the Romans off as a filthy or disgusting society. Many of their ideas, like fertilizers and bathhouses, were fundamentally sound but narrowly missed the mark in terms of execution because they simply didn’t understand how germs and parasites were spread, she says. “You can’t blame the Romans for that. It’s something they weren’t honestly aware of.”

*Correction, 8 January, 11:15 a.m.: This story has been corrected to reflect that this reasearch was published in Parasitology rather than The American Journal of Parasitology.