Gradec was given a royal charter by King Béla IV in 1242. The royal charter, also called the Golden Bull, was a very important document by which Gradec was declared and proclaimed "a free royal city on Gradec, the hill of Zagreb". This act made Gradec a feudal holding responsible directly to the king. The citizens were given rights of different kinds; among other things they were entitled to elect their own city magistrate () fulfilling the role of mayor. They were also entitled to manage their own affairs.