Military tension had for a long time existed between ancient China and the northern barbarians, mainly because the fertile lands of the prosperous agricultural civilization presented attractive targets for the militaristic nomadic tribes. Throughout ancient Chinese history, protecting the northern borders from nomadic raids had been a military priority. During the Zhou dynasty, northern vassal states such as Yan, Zhao and Qin resorted to defensive strategies, constructing elongated fortresses that served as the precursors of the Great Wall of China. During the Qin dynasty, the first emperor Qin Shi Huang conscripted thousands of civilian labourers to perfect the Great Wall in order to reinforce military campaigns along the northern border.