A defensive wall in northern China, extending over a total distance of 6700 km (4200 miles) from the Jiayuguan Pass in Gansu province to Shanhaiguan on the Yellow Sea north of Beijing. Its origin dates from c.210 bc when the country was unified under one ruler (Qin Shi Huang), and the northern walls of existing rival states were linked to form a continuous protection against nomad invaders. It was rebuilt in medieval times largely against the Mongols, and the present wall dates from the Ming Dynasty (1368–1544). Although principally a defensive wall it served also as a means of communication, and is said to be the only man-made feature that would be visible from a space orbit.