In the Árpadian period the society of the Kingdom of Hungary was divided into several groups. Each group had its own particular status, including complex systems of services and rights, which were characteristic exclusively to a particular group. At the edges of this spectrum one can find both nobles and tenant-peasants or serfs. The system functioned in such a manner that nobles had most of the rights and offered few of the services, while serfs had no rights at all. However, between these two extreme points there were several other individuals, who bore various statuses; some types of liberties were connected to certain duties. Until the fourteenth century this diversity of social statuses disappeared, and society was divided into two big groups: nobles and tenant peasants (Lat. iobagio). However, in Slavonia, though it was a part of medieval Hungary south of the River Drava, this social process was a bit different: members belonged to one among the types of these special liberties, the strata of the so-called castle-warriors (Lat. iobagiones castri, Hung. várjobbágyok), successfully ‘survived’ these changes, and during the fifteenth century they were mentioned in the charters as nobles belonging to a castle (Lat. nobiles castri, Hung. várnemesek). The castle-warriors and castle nobles were closely connected to their own comitatus.
The word comitatus meant two different things in the Latin sources of the medieval Kingdom of Hungary. On the one hand, it was the name of each unit of the castle-system (Hung. várispánság). In the centre of this unit stood a castle, and the person who was its head was called comes, and was in charge of the appertaining estates. On the other hand, comitatus was also the term for larger territorial unit which formed the administrative system of the Kingdom (Hung. megye); it contained all the lands and possessions regardless whether they belonged to ecclesiastical or secular lords or even royalty. The head of the royal county was called comes as well, and in the early period he was actually the same person who was the head of the respective castle district. However, in many cases royal counties contained more than one castle district. Until the fourteenth century some castle districts merged into another comitatus, and vanished completely (for example, the castle district called Karakó became the part of the royal county named Vas at the western borders of the Kingdom).