Master of the doorkeepers

The Master of the doorkeepers (királyi (fő)ajtónállómester, Janitorum regalium magister, Königlicher Oberst-Türhüter) was a high-ranking official in the Kingdom of Hungary from the beginning of the 11th century to 1945. Formerly, the office was known as Ispán of the keepers (csőszök ispánja, comes preconum).

Origins and duties
The office-holders supervised the keepers in the royal manors and the court, who were responsible for guarding and had messenger functions. The Master of the doorkeepers cited the subjects of the Crown, with whom the monarch wished to speak, with his ore seal (the "King's citations seal") and using the countrywide messenger network. They also carried 'the bloody sword' across the realm, when the King called to war.

According to the legend of Crown and Sword, the Ispán of the keepers warned Prince Béla to choose the sword instead of the crown before the death bed of his brother Andrew I in 1060. The scene indicates that the Ispán might be also served as Commander of the Royal Guard.

The position was called as "Master of the doorkeepers" first in 1261. He was the magistrate of the royal guards ("doorkeepers") according that source. He had to ensure the safety of the king and the royal family.

The Master of the doorkeepers was one of the lesser barons of the realm, according to the Tripartitum (Article 94) created by István Werbőczy in the 16th century. He was also member of the Royal Council. From the Anjou Age, the actual tasks was conducted by his deputy, usually a familial from the lesser nobility. Later, the office merged with the position of Marshal (udvarmester). After the Battle of Mohács, the office remained and belonged to the Habsburg royal court. Since 1608, the Master of the doorkeepers also oversaw the order of operations the Diet of Hungary. The office-holder was a member of the Upper House until the Hungarian Revolution of 1848 then of the House of Magnates until the Second World War. The office was only a symbolic function after 1848.