Due to changed economic circumstances, insufficient pasturage to support a nomadic society and the impossibility of moving on, the semi-nomadic Hungarian lifestyle began to change and the Magyars adopted a settled life and turned to agriculture, though the start of this change can be dated to the 8th century. The society became more homogeneous: the local Slavic and other populations merged with the Hungarians. The Hungarian tribal leaders and their clans established fortified centers in the country and later their castles became centers of the counties. The whole system of Hungarian villages developed in the 10th century.