inhabited 6000 years ago. During the Spring and Autumn period (approximately 771 to 476 BC), it belonged to the Kingdom of Wu, which was conquered by the Kingdom of Yue, which in turn was conquered by the Kingdom of Chu. During the Warring States period (475 BC), Shanghai was part of the fief of Lord Chunshen of Chu, one of the Four Lords of the Warring States. He ordered the excavation of the Huangpu River. Its former or poetic name, the Chunshen River, gave Shanghai its nickname of "Shēn". Fishermen living in the Shanghai area then created a fish tool called the hù, which lent its name to the outlet of Suzhou Creek north of the Old City and became a common nickname and abbreviation for the city. Imperialism 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.By the end of the Song dynasty, the center of trading had moved downstream of the Wusong River to Shanghai. It was upgraded in status from a village to a market town in 1074, and in 1172, a second sea wall was built to stabilize the ocean coastline, supplementing an earlier dike. From the Yuan dynasty in 1292 until Shanghai officially became a municipality in 1927, central Shanghai was administered as a county under Songjiang Prefecture, which had its seat in the present-day Songjiang District. Two important events helped promote Shanghai's developments in the Ming dynasty. A city wall was built for the first time in 1554 to protect the town from raids by Japanese pirates. It measured high and in circumference. A City God Temple was built in 1602 during the Wanli reign. This honor was usually reserved for prefectural capitals and not normally given to a mere county seat such as Shanghai. Scholars have theorized that this likely reflected the town's economic importance, as opposed to its low political status. During the Qing dynasty, Shanghai became one of the most important sea ports in