The Great Wall snakes through the countryside over deserts, hills, and plains for several thousand miles. At its closest point it is less than 40 miles (60 km) from Beijing. The wall was created following the unification of China under Qin Shi Huangdi (221–210 BC). Despite impressive battlements, it ultimately proved ineffective; it was breached in the 13th century by the Mongols and again, in the 17th century, by the Manchus. Today, only select sections of its crumbling remains have been fully restored, with four main sites accessible from Beijing: Badaling, Mutianyu, Huanghua Cheng, and Simatai.