royal seat for hundreds of years. 43 kings were crowned in Székesfehérvár (the last one in 1526) and 15 kings were buried here (the last one in 1540). In the 12th century, the town prospered, churches, monasteries, and houses were built. It was an important station on the pilgrim route to the Holy Land. András II issued the Golden Bull here in 1222. The Bull included the rights of nobles and the duties of the king, and the Constitution of Hungary was based on it until 1848. It is often compared to England's Magna Carta. During the Mongol Invasion of Hungary (1241–1242), the invaders could not get close to the castle: Kadan ruled Mongol warriors could not get through the surrounding marshes because of flooding caused by melting snow. In the 13th–15th centuries, the town prospered, and several palaces were built. In the 14th century, Székesfehérvár was surrounded by city walls. After the death of King Mátyás (1490), the German army of 20,000 men of Maximilian invaded Hungary. They advanced into the heart of Hungary and captured the city of Székesfehérvár, which he sacked, as well as the tomb of King Mátyás, which was kept there. His Landsknechts were still unsatisfied with the plunder and refused to go for taking Buda. He returned to the Empire in late December and the Hungarian troops liberated Székesfehérvár in the next year. Ottoman period The Ottomans conquered the city after a long siege in 1543 and only after a sally ended in most of the defenders including the commander, György Varkoch, being locked out by wealthy citizens fearing they might incur the wrath of the Ottomans by a lengthy siege. Except for a short period in 1601 when Székesfehérvár was reconquered by an army led by Lawrence of Brindisi, the city remained under Ottoman administration for 145 years, until 1688, with the Ottomans being preoccupied with the Morean War. They named the city Belgrade ("white city", from Serbian Beograd) and built mosques. In the 16th–17th centuries it looked like a Muslim city. Most of the original population fled. It was a sanjak centre in Budin Province as "İstolni Belgrad" during Ottoman rule. Habsburg Monarchy The city began to prosper again only in the 18th century. It had a mixed population: Hungarians, Germans, Serbs, and Moravians. By 1702, the cathedral of Nagyboldogasszony was blown up, thus destroying the largest cathedral in Hungary at that