<P> However, wall construction continued regardless of court politics during this time . The Ordos walls underwent extension, elaboration, and repair well into the 16th century . Brick and stone started to replace tamped earth as the wall building material, because they offered better protection and durability . This change in material gave rise to a number of necessary accommodations with regard to logistics, and inevitably a drastic increase in costs . Instead of being able to draw on local resources, building projects now required brick - kilns, quarries, and transportation routes to deliver bricks to the work site . Also, masons had to be hired since the local peasantry proved inadequate for the level of sophistication that brick constructions required . Work that originally could be done by one man in a month with earth now required 100 men to do in stone . </P> <P> With the Ordos now adequately fortified, the Mongols avoided its walls by riding east to invade Datong and Xuanfu (宣 府; present - day Xuanhua, Hebei Province), which were two major garrisons guarding the corridor to Beijing where no walls had been built . The two defence lines of Xuanfu and Datong left by the Northern Qi and the early Ming had deteriorated by this point, and for all intents and purposes the inner line was the capital's main line of defence . </P> <P> From 1544 to 1549, Weng Wanda (翁 萬達; 1498--1552) embarked on a defensive building program on a scale unprecedented in Chinese history . Troops were re-deployed along the outer line, new walls and beacon towers were constructed, and fortifications were restored and extended along both lines . Firearms and artillery were mounted on the walls and towers during this time, for both defence and signalling purposes . The project's completion was announced in the sixth month of 1548 . At its height, the Xuan--Da portion of the Great Wall totalled about 850 kilometres (530 miles) of wall, with some sections being doubled - up with two lines of wall, some tripled or even quadrupled . The outer frontier was now protected by a wall called the "outer border" (外邊, wàibiān) that extended 380 kilometres (240 mi) from the Yellow River's edge at the Piantou Pass (偏 頭 關) along the Inner Mongolia border with Shanxi into Hebei province; the "inner border" wall (內 邊, nèibiān) ran southeast from Piantou Pass for some 400 kilometres (250 mi), ending at the Pingxing Pass; a "river wall" (河 邊, hébiān) also ran from the Piantou Pass and followed the Yellow River southwards for about 70 kilometres (43 mi). </P> <P> As with Yu Zijun's wall in the Ordos, the Mongols shifted their attacks away from the newly strengthened Xuan--Da sector to less well - protected areas . In the west, Shaanxi province became the target of nomads riding west from the Yellow River loop . The westernmost fortress of Ming China, the Jiayu Pass, saw substantial enhancement with walls starting in 1539, and from there border walls were built discontinuously down the Hexi Corridor to Wuwei, where the low earthen wall split into two . The northern section passed through Zhongwei and Yinchuan, where it met the western edge of the Yellow River loop before connecting with the Ordos walls, while the southern section passed through Lanzhou and continued northeast to Dingbian . The origins and the exact route of this so - called "Tibetan loop" are still not clear . </P>

Who was the great wall of china built by