The first landmark visitors will encounter in Xi'an is the ancient city wall, which stretches round the old city. The northern side runs parallel to the railway. Xi'an was originally a walled city, and even today the wall is considered a landmark dividing the city into the inner part and the outer part. The city wall is massive - tall, long and thick. The South Gate and North Gate are the two main entrances to the inner city. The city itself is neatly arranged along the city wall.
Xi'an City Wall was erected in the 14th century Ming Dynasty, under the regime of Emperor Zhu Yuanzhang. When Zhu Yuanzhang captured Huizhou, long before the establishment of the Ming Dynasty, he was admonished by a hermit named Zhu Sheng, who told him to "build high walls, store abundant provisions and take your time in proclaiming yourself emperor." This advice Zhu Yuanzhang heeded. Once the whole country was unified, he sent orders to the local governments to build city walls on a large scale. Zhu assured that "out of all the mountains and rivers in the world, the area of Central Qin is the most strongly fortified and strategically impregnable." The current city wall is an enhancement of the old Tang Dynasty structure, as a result of the emperor's wall building campaign.
The first city wall of Xi'an was built of earth, rammed layer upon layer. The base layer was made of earth, quick lime, and glutinous rice extract, tamped together. It made the wall extremely strong and firm. Later, the wall was totally enclosed with bricks. A moat, wide and deep, ran around the city. Over the moat, there used to be a huge drawbridge, which would cut off the way in and out of the city, once lifted.
Xi'an's city wall, after its enlargement in the Ming Dynasty, stands 12 meters high. It is 12-14 meters across the top, 15-18 meters thick at bottom, and 13.7 kilometers in length. There is a rampart every 120 meters. The ramparts are towers that extend out from the main wall. The ramparts were built to allow soldiers to see enemies trying to climb the wall. The distance between the ramparts is within the range of arrows fired from either side. This allowed soldiers to protect the entire wall without exposing themselves to the enemy. There are altogether 98 ramparts; each has a sentry building on top of it.
The gates of the city wall were the only way to go into and out of town. Therefore, these gates were important strategic points, which the feudal rulers racked their brains to try to defend. In Xi'an's case, the north, south, east and west gates, each consist of three towers: the gate tower, which holds the drawbridge, the narrow tower and the main tower. The gate tower stands proud of the wall. It is used to lift and lower the drawbridge. The narrow tower is in the middle. Its inner walls have square windows to shoot arrows from. The main tower is the innermost one, and forms the entrance to the city.
The narrow tower and the main tower are connected by tunnels, in which soldiers could be stationed. From the tunnels there are also horse passages leading to the top of the wall. There are gradually ascending steps, made so that it was easy for war horses to ascend and descend. There are all together 11 horse passages around the city.
A watch tower is located on each of the four corners of the wall. The one at the southwestern corner is round, probably after the model of the imperial city wall of the Tang Dynasty, but the other three are square-shaped. On top of the watch towers there is a corner rampart, higher and larger than the ordinary ramparts. This shows the strategic importance of the corners of the city wall in war times.
Along the outer crest of the city wall there are crenellations or battlements. Under each of the 5,984 crenels there is a square hole, from which arrows were shot and watch was kept. The lower, inner walls are called parapets. They were used to prevent soldiers from falling off the wall, when traveling back and forth.