The Great Wall was originally built in the Spring, Autumn,
and Warring States Periods as a defensive fortification
by the three states: Yan, Zhao and Qin.
The Great Wall went through constant extensions and repairs in later dynasties.
In fact, it began as independent walls for different states when it was first built,
and did not become the "Great" wall until the Qin Dynasty.
Emperor Qin Shihuang succeeded in his effort to have the walls
joined together to fend off the invasions from the Huns
in the north after the unification of China.