The Great Wall of China was built over a very long period, spanning more than 2,500 years. Its construction began during the Western Zhou Dynasty (1046 BC - 771 BC), with the earliest known walls like the "Chu Fangcheng" built around the 7th century BC. Various small states built walls to defend themselves during the Spring and Autumn and Warring States periods. The first emperor of unified China, Qin Shi Huang, around 220 BC, ordered the connection of these separate walls into a unified Great Wall, which formed an initial continuous system over 10,000 kilometers. Subsequent dynasties such as the Han, Sui, Song, Ming, and Qing extended, repaired, and modified the walls. The most well-known and frequently visited sections today date from the Ming Dynasty (1368-1644 AD). Construction continued in some form until the late Qing Dynasty, with the last major work done around 1878. Thus, the Great Wall was under construction from roughly the 7th century BC until the late 19th century AD, making it a remarkable defense project spanning more than two millennia.