If you’ve ever visited the Leaning Tower of Pisa, you know it’s hard to look at it without feeling like it might topple over.

Construction of the freestanding bell tower of the cathedral of Pisa began in 1173 and took a whopping 344 years. The famous lean began in 1178 when the weight of the second floor began putting pressure on the foundations. The ground on which it sits is made up of soft clay, sand, and shells, hence the shift.

Building was halted soon after it began as Pisa went to war with the regions of Florence, Genoa, and Lucca — giving the soil a good 100 years to settle and rebalance the construction. It is believed that if this waiting period had not occurred, the tower would not be standing today.

Over the next century, construction was intermittent but the tower was officially completed around 1370. Over the centuries to come, engineers and architects have tried in vain to correct the lean and have marveled at the structure’s resilience.

More than 600 years later, the mystery behind how the Leaning Tower of Pisa has been able to withstand earthquakes and not topple over has been solved by a team of engineers from the Roma Tre University, Rome.

They concluded that it is the very soft sand on which the tower rests and its marble structure that has contributed to its durability.

A researcher from The University of Bristol, George Mylonakis remarked in a statement:

“Ironically, the very same soil that caused the leaning instability and brought the Tower to the verge of collapse, can be credited for helping it survive these seismic events.”

The results will be presented at 16th European Conference in Earthquake Engineering in June. The team from the Roma Tre University closely examined the materials used in construction against the soil composition to find an anchoring and insulating effect from the frequent seismic shocks.

This research may well be useful in the construction of new buildings in earthquake-prone countries such as Chile, Mexico, and Indonesia, to name a few.