<P> Of these walls, those of the northern states Yan, Zhao, and Qin were connected by Qin Shi Huang when he united the Chinese states in 221 BC . </P> <P> The State of Yan, the easternmost of the three northern states, began to erect walls after the general Qin Kai drove the Donghu people back "a thousand li" during the reign of King Zhao (燕 昭王; r . 311--279 BC). The Yan wall stretched from the Liaodong peninsula, through Chifeng, and into northern Hebei, possibly bringing its western terminus near the Zhao walls . Another Yan wall was erected to the south to defend against the Zhao; it was southwest of present - day Beijing and ran parallel to the Juma River for several dozen miles . </P> <P> The Zhao walls to the north were built under King Wuling of Zhao (r . 325--299 BC), whose groundbreaking introduction of nomadic cavalry into his army reshaped Chinese warfare and gave Zhao an initial advantage over his opponents . He attacked the Xiongnu tribes of Linhu (林 胡) and Loufan (樓 煩) to the north, then waged war on the state of Zhongshan until it was annexed in 296 BC . In the process, he constructed the northernmost fortified frontier deep in nomadic territory . The Zhao walls were dated in the 1960s to be from King Wuling's reign: a southern long wall in northern Henan encompassing the Yanmen Pass; a second line of barricades encircling the Ordos Loop, extending from Zhangjiakou in the east to the ancient fortress of Gaoque (高 闕) in the Urad Front Banner; and a third, northernmost line along the southern slopes of the Yin Mountains, extending from Qinghe in the east, passing north of Hohhot, and into Baotou . </P> <P> Qin was originally a state on the western fringe of the Chinese political sphere, but it grew into a formidable power in the later parts of the Warring States period when it aggressively expanded in all directions . In the north, the state of Wei and the Yiqu built walls to protect themselves from Qin aggression, but were still unable to stop Qin from eating into their territories . The Qin reformist Shang Yang forced the Wei out of their walled area west of the Yellow River in 340 BC, and King Huiwen of Qin (r . 338--311 BC) took 25 Yiqu forts in a northern offensive . When King Huiwen died, his widow the Queen Dowager Xuan acted as regent because the succeeding sons were deemed too young to govern . During the reign of King Zhaoxiang (r . 306--251 BC), the queen dowager apparently entered illicit relations with the Yiqu king and gave birth to two of his sons, but later tricked and killed the Yiqu king . Following that coup, the Qin army marched into Yiqu territory at the queen dowager's orders; the Qin annihilated the Yiqu remnants and thus came to possess the Ordos region . At this point the Qin built a wall around their new territories to defend against the true nomads even further north, incorporating the Wei walls . As a result, an estimated total of 1,775 kilometres (1,103 mi) of Qin walls (including spurts) extended from southern Gansu to the bank of the Yellow River in the Jungar Banner, close to the border with Zhao at the time . </P>

Where does great wall of china start and finish