Once upon a time, the Aqueduct of Valens was one of the longest aqueduct lines in the ancient world.

By the fifth century, Constantinople's citizens were getting their water through this channel - named after emperor Valens - that could have exceeded 500 kilometers (310 miles) in its prime. Today, scientists have finally identified a clever trick once used to keep this mighty piece of infrastructure clean.

There was a lot of maintaining to do. The canal stretched to include fresh water springs up to 120 kilometers (roughly 75 miles) away from the city. The system incorporated large masonry channels big enough to walk through, 90 large bridges, and numerous tunnels that ran up to a length of 5 kilometers (a little over 3 miles).

By collecting and studying calcium carbonate deposits, the team of researchers was able to assess the buildup of limescale in the aqueduct. The gathered samples suggested less than 30 years' worth of limescale had formed, even though the canals were known to be operational for more than seven centuries, until at least the 1100s.

"This means the entire aqueduct must have been maintained and cleaned of deposits during the Byzantine Empire, even shortly before it ceased working," says paleoclimatologist Gül Sürmelihindi, from the Johannes Gutenberg University of Mainz (JGU) in Germany.

One section of the canal in particular hinted at how this was done: a 50-kilometer (31-mile) stretch of the central portion of the aqueduct that was made up of two channels, one above the other, occasionally crossing on two-story bridges.

A dual-channel approach would have enabled engineers to clean out the aqueduct without completely stopping the water flow to Constantinople for weeks or even months – something that obviously would have caused serious supply problems.

Limescale could have eventually clogged up the slow-flowing waterways, so the researchers think thorough cleaning may have been a regular occurrence. Clay was another potential contaminant in water taken from dams.

"It is very likely that this [dual channel] system was set up to allow for cleaning and maintenance operations," says geologist Cees Passchier, from JGU. "It would have been a costly but practical solution."

The entire aqueduct network was actually built in sections over the course of several centuries, and is yet another example of advanced construction carried out during the time of the Roman Empire.

While the Romans didn't invent aqueducts, they made them bigger and more sophisticated than ever before. Sürmelihindi describes water management systems such as this one "the most groundbreaking technical achievement" of the Roman Empire.

And there were many more aqueducts and canals running into Roman cities too – some of these cities got more water in ancient times than they do now. Over 2,000 long-distance Roman aqueducts are known about, and the researchers think there are yet more to find.

"These aqueducts are mostly known for their impressive bridges, such as the Pont du Gard in southern France, which are still standing today after two millennia," says Passchier.

"But they are most impressive because of the way problems in their construction were solved, which would be daunting even for modern engineers."

The research has been published in Geoarchaeology.