The office had already existed under Stephen I (997-1038) at the latest, who was crowned the first king of Hungary in 1000 or 1001 [REF].
The monarch appointed a royal official styled comes in contemporary documents at the head of each fortress [REF].