Gormaz was the largest fortress in Europe after its expansion in 956 AD. It is without a doubt the greatest example of military architecture, not only in Soria but in the entire Spanish territory. The original castle was built shortly after 756 AD by emir Abd ar-Rahman I of Córdoba, as part of a state ('dawla') policy to control rich landowners and peasants, as well as to try to govern and protect the Central Marches in the Douro Valley against the Christians to the North. In 965, Caliph al-Hakem II rebuilt and expanded the castle, as attested by an inscription over one of the gates.
The castle is more than 390 metres long though only 10-40 metres wide, has 28 towers, a main gate with a monumental horseshoe arch with remains of painted red and white voussoirs, two posterns, one of which with a small horseshoe arch, three mihrabs corresponding to a 'musalla' or open air collective oratory, use of 'spoliae' of the Roman period, and the remains of a water pool near the monumental gate mentioned before. It was repaired in the 14th century, from which time date the remains of two gates on the southern side.
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.