CASTLES OF SPAIN - Gormaz castle. The castle is located 13 kilometers of El Burgo de Osma, at Gormaz, Soria, Castile-Leon, Spain. It is situated north of the Duero river. It 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.