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.