The majority of the existing walls at the Great Wall of China now was made during the Ming Dynasty. However, some of the walls have been built as early as 7th century BCE. The most famous of which are the walls built by the first Emperor of China, Qin Shi Huang. The walls served as protection of the Chinese empire from raids and invasions by nomadic group, and as a border control. The entirety of the Great Wall is measuring about 21,196 km.