During the Tang Dynasty, Tubo invaded Chang'an and destroyed Chang'an's water conservancy system. Since then, Chang'an has lost its qualification as the capital.