During the Tang and Song dynasties, Qinglong Town () in modern Qingpu District was a major trading port. Established in 746 (the fifth year of the Tang Tianbao era), it developed into what historically called a "giant town of the Southeast", with thirteen temples and seven pagodas. Mi Fu, a scholar and artist of the Song dynasty, served as its mayor. The port experienced thriving trade with provinces along the Yangtze and the Chinese coast, as well as with foreign countries such as Japan and Silla.