The plumbing systems installed in many Roman cities were engineering marvels of their time, and an analysis of soil samples has given experts new insight into how the sewage systems of the day were linked to the rise and fall of Roman civilisations.

How are they linked? When the Romans discovered lead around 2,200 years ago, it was quickly used to expand and upgrade the plumbing in cities, leading to small lead particles getting into the water supply.

By tracking levels of lead in layers of soil sediments, researchers were able to correlate increased lead levels with urban expansion, giving them an ingenious way of peering back into the past to see how the city of Rome fared.

"High-resolution geochemical, isotopic, and 14C analyses of a sedimentary core from Ostia harbor have allowed us to date the commissioning of Rome's lead pipe water distribution system to around the second century BC, considerably later than Rome's first aqueduct built in the late fourth century BC," write the researchers.

"Even more significantly, the isotopic record of Pb pollution proves to be an unparalleled proxy for tracking the urban development of ancient Rome over more than a millennium."

The team from the National Centre for Scientific Research in France, the University of Southampton in the UK, and the University of Glasgow in the UK, looked at 177 different 12-metre soil cores taken from the sites of ancient Rome's two harbours: Ostia (now inland) and Portus.

Carbon dating was used to identify the age of the samples before their chemical composition was tested.

Lead particles from the city's plumbing would've washed into the Tiber river, and then started sinking in the slower harbour waters, suggest the researchers, so more lead should mean the water passed through more lead piping.

They found a sudden rise of lead corresponding to 200 BCE, when it looks like wood and stone aqueducts were replaced by lead. Later layers of soil showed lead with different compositions, hinting that Rome's plumbing was being improved with lead of varying ages and from varying places.

Through this analysis the researchers say they can get a better understanding of the expansion of the water system, the time it fell into disrepair (probably during the civil wars of the first century BCE), and the time it peaked (the stable, early high Imperial period).

With very few written records of some of these times available to historians, the soil samples could help plug some crucial gaps in what we know about Rome.

The 200 BCE spike in lead, for example, puts lead piping in the city 150 years earlier than previous archaeological evidence had shown. The plumbing would've been expensive to put together and maintain, and so it acts as a mirror to the city's fortunes – when Rome suffered, so did its pipes.

Some have hypothesised that the Romans love of lead led to both people and marine life getting poisoned by it. This new research doesn't put an end to that debate, but it does tell us much more about the growth and decline of the city.

"This core record fills the gap in the system's history before the appearance of more detailed literary and inscriptional evidence from the late first century BC onward," write the researchers.

The findings have been published in PNAS.