When Zhu Yuanzhang, the first Emperor of the Ming dynasty (1368-1644), captured Huizhou, a hermit named Zhu Sheng admonished him that he should "built high walls, store abundant food supplies and take time to be an Emperor," so that he could fortify the city and unify the other states. After the establishment of the Ming dynasty, Zhu Yuanzhang followed his advice and began to enlarge the wall built initially during the old Tang dynasty (618 -907), creating the modern Xian City Wall. It's the most complete city wall that has survived in China, as well being one of the largest ancient military defensive systems in the world. After the extension, the wall now stands 12 meters (40 feet) tall, 12-14 meters (40-46 feet) wide at the top and 15-18 meters (50-60 feet) thick at the bottom. It covers 13.7 kilometers (8.5 miles) in length with a deep moat surrounding it. Every 120 meters, there is a rampart which extends out from the main wall. All together, there are 98 ramparts on the wall, which were built to defend against the enemy climbing up the wall. On the outer side of the city wall, there are 5948 crenellations, namely battlements. The soldiers can outlook and shoot at the enemy. On the inner side, parapets were built to protect the soldiers from falling off. Since the ancient weapons did not have the power to break through a wall and the only way for an enemy to enter the city was by attacking the gate of the city wall. This is why complicated gate structures were built within the wall. A nice suggestion for tourists: Try biking on the City Wall, you will have an enjoyable and interesting experience.