King Stephen ordered the building of a castle at Moson to defend the border in the early 11th century. Settlers flocked around the wooden and then stone castle, and by the 11th century it was described as a strong fortress and bustling merchant town. However, in 1030, the Holy Roman Emperor Conrad II was able to conquer the castle on his way to the Rába. During the Crusades, Kálmán, King of Győr and Moson, was able to defeat a Swabian-Bavarian army of 15,000 men from the castle. The next disaster occured in 1271, when Ottokar II, a Czech king, leveled the castle.
Béla IV, King of Hungary at the time, did not consider it worthwhile to try and rebuild the castle at Moson. After the fall of Győr to the Ottoman army in 1594, the castle was modernized to withstand a possible future attack by Italian engineers.
In 1683, the new castle was helpless against the retreating Turkish army, which had been repulsed again at Vienna. Both Moson and Magyaróvár were set ablaze. Though the town archives were now completely destroyed, the damage was repaired more quickly this time around, at least quickly enough to allow Rákóczi to use the castle as a base during his war for independence from the Habsburgs. In 1721, after the revolution was crushed, the castle at Magyaróvár lost its strategic importance, and all military materiel was transferred to Bratislava.
References:The Walls of Constantinople are a series of defensive stone walls that have surrounded and protected the city of Constantinople (today Istanbul) since its founding as the new capital of the Roman Empire by Constantine the Great. With numerous additions and modifications during their history, they were the last great fortification system of antiquity, and one of the most complex and elaborate systems ever built. They were also the largest and strongest fortification in both the ancient and medieval world.
Initially built by Constantine the Great, the walls surrounded the new city on all sides, protecting it against attack from both sea and land. As the city grew, the famous double line of the Theodosian Walls was built in the 5th century. Although the other sections of the walls were less elaborate, they were, when well-manned, almost impregnable for any medieval besieger.