At the end of the 10th century the Hungarian state was established, with the territory of present-day Bratislava annexed to it in the reign of Stephen I (1001-1038). Bratislava became an important economic and administrative centre of the Hungarian borderland. Alongside the advantages following from this position, the significance of the castle at Bratislava and its vicinity was also bringing disadvantages in the form of frequent military attacks. As early as 1042, German King Henry I destroyed Bratislava. Further military unrest occurred between 1074 – 1077 in relation to a dispute regarding the Hungarian throne.
In the 13th century, royal privileges were granted to Bratislava. A significant period in the life of the town at the turn of the 14 th and 15th centuries was that during the reign of Sigismund of Luxembourg. Sigismund confirmed earlier donations and privileges granted to the town by the ruling families of Arpads and Anjouos and then, granting new privileges, he accentuated Bratislava as a prominent political and economic town within Hungary. Based on his decree of 1405, Bratislava ranked amongst the most significant towns that have been called royal towns since then. In 1434, he granted the town a heraldic deed, with the right to use a coat of arms depicting three towers above an open gate in city walls.