The history of the Great Wall of China began when fortifications built by various states during the Spring and Autumn (771 -- 476 BC) and Warring States periods (475 -- 221 BC) were connected by the first emperor of China, Qin Shi Huang, to protect his newly founded Qin dynasty (221 -- 206 BC) against incursions by nomads from Inner Asia. The walls were built of rammed earth, constructed using forced labour, and by 212 BC ran from Gansu to the coast of southern Manchuria.

Answer this question based on the passage: when was the great wall of china first built? OK. Let's think. My stream of consciousness:
To answer the above question, the relevant sentence is: The history of the Great Wall of China began when fortifications built by various states during the Spring and Autumn (771 -- 476 BC) and Warring States periods (475 -- 221 BC) were connected by the first emperor of China, Qin Shi Huang, to protect his newly founded Qin dynasty (221 -- 206 BC) against incursions by nomads from Inner Asia. The answer is 771 -- 476 BC.