The Alcázar of Segovia (literally, The Castle of Segovia) is a stone fortification, rising out on a rocky crag above the confluence of the rivers Eresma and Clamores near the Guadarrama mountains. It is one of the most distinctive castle-palaces in Spain, shaped like the bow of a ship. (The photo shows only part of it)
The Alcázar of Segovia, like many fortifications in Spain, started off as an Arab fort, which itself was built on a Roman fort but little of that structure remains. It has served as a royal palace, a state prison, a Royal Artillery College and a military academy since Moorish times.