By the seventh century B.C., the Chinese already knew about building walls. During the Warring States Period, from the fifth century B.C. to 221 B.C., states constructed vast fortifications to protect themselves from rival kingdoms. But the Chinese weren’t just fighting each other. They were also being attacked by nomads of the lands just north of present-day China.
Most threatening were the Xiongnu, who ruled an empire that stretched beyond the borders of modern-day Mongolia. Because they lived in the desert, these tribes lacked many staples and luxuries common to Chinese society. So the Xiongnu raided and looted Chinese cities. The Xiongnu were considered very dangerous. That’s why the first Emperor of China, Qin Shi Huangdi, ordered the construction of a great wall to protect his empire from Xiongnu attacks.