mortar, and spans 818 meters with more than 170 arches, the highest being 29 metres high. The Alcazar of Segovia, the royal palace built on a stone peninsula between the rivers Eresma and Clamores, is documented for the first time in 1122, although it may have existed earlier. It was one of the favored residences of the kings of Castile, built in the transition from Romanesque architecture to Gothic and Mudéjar. The building is structured around two courtyards and has two towers, and a keep. It was a favourite residence of Alfonso X the Wise and Henry IV, and Isabella the Catholic was crowned Queen of Castile in Segovia's Plaza Mayor. Devastated by a fire in 1862, it was later rebuilt. It now houses the General Militar de Segovia archive and museum of the Royal School of Artillery, managed by the Board of the Alcazar. The Segovia Cathedral, the last Gothic cathedral built in Spain. It is considered a masterpiece of Basque-Castilian Gothic architecture and is known as "The Lady of Cathedrals." Juan Gil de Hontañón, Rodrigo Gil de Hontañón, and other masters of Spanish architecture worked on the construction. It was consecrated in 1768 and is 105 meters long, 50 metres wide and 33 m high in the nave, has 18 chapels and has three doors: El Perdón, San Frutos and San Geroteo. The Walls of Segovia existed when Alfonso VI of León and Castile retook the city from the Arabs. Alfonso had them enlarged, and also increased its perimeter to 3 kilometres, with eight towers, five gates, and several doors. It was built mainly of granite blocks but also reused gravestones from the old Roman necropolis. The wall encircles the historic quarter and currently has three gates: San Cebrián; Santiago, built in the Mudéjar style; and San Andrés, gateway to the Jewish quarter; and the breaches of Consuelo, San Juan, the Sun, and the Moon. Religious architecture Churches and chapels The city maintains an important collection of Romanesque churches of both stone and brick, which include the churches of San Esteban, San Millán, San Martín, la Santísima Trinidad, San Andrés, San Clemente, Santos Justo y Pastor, Iglesia de la Vera Cruz (Order of Malta), and San Salvador. The old main synagogue is a former synagogue, converted into a convent after the expulsion of the Jews from Spain in 1492. Monasteries and convents The city of Segovia preserved also