[1]: 9 It is the oldest surviving part of the Alhambra, having been built by Muhammad I Ibn al-Ahmar, the founder of the Nasrid dynasty, after 1238.
[2]: 81 The Alcazaba is situated at the western tip of the Sabika hill, a promontory projecting from the foothills of the Sierra Nevada.
[1]: 23 A fortress (ḥiṣn) named Ġarnāṭa (also transliterated as Gharnāṭa) existed on the south side of the Darro River.
He re-used some of the foundations of the earlier Zirid fortress and built the new Alcazaba over them, enclosed the rest of the hill with a perimeter wall, and completed an aqueduct in the same year, which enabled the area's subsequent development.
[8]: 154 Among later Nasrid additions, Yusuf I (r. 1333–1354) added what is now called the Torre Quebrada ('Broken Tower') to the eastern wall of the fortress in the 14th century.
[9] According to tradition, when Granada and the Alhambra were surrendered to the Catholic Monarchs on January 2, 1492, the flag of Castile was raised that same day over the Torre de la Vela in the Alcazaba.
[1]: 80 [2]: 82, 90 Multiple modifications and additions to the fortress were made by the Spanish in the 16th century to fortify it against gunpowder artillery weapons which had become a regular part of warfare by this time.
[2]: 93 In the early 20th century archaeologists cleared the interior of the fortress of rubble and excavated the remains of the urban area there.
[2]: 86 Repairs and restorations were also carried out on the rest of the fortress in modern times, particularly under the direction of Leopoldo Torres Balbás, who was the architectural conservator of the site from 1923 to 1936.
This is especially evident on the northern side, where it is defended by up to three lines of walls corresponding to different elements of the Alhambra's defensive system.
In this area it also protects the road that runs between the city and the Alhambra's interior, passing through the gate known as Puerta de las Armas ('Gate of Arms').
[2]: 86 Within the area of this outer rampart, near the Puerta de las Armas, is a ruined structure that formerly housed the stables.
Its obscured setting made it more difficult for any spies or observers to monitor movements within the fortress such as the changing of the guard.
The residence was organized similarly to the courtyard houses that were typical of the time and which are also found in the urban area of the fortress.
This tower, which has a rounded profile on its outer side, was added in the Christian Spanish period as part of other improvements to provide better protection against the gunpowder artillery of the time.
[2]: 90–91 The Ravelin is connected by another wall to the Torres Bermejas, an outlying fortification on the Mauror Hill to the south of the Alhambra.
[2]: 91 The area within the walls of the inner fortress was occupied in the Nasrid era by a small residential district, known in Spanish as the Barrio Castrense ('Military Quarter').
On the north side of the street is an array of about ten to seventeen houses with similar layouts but varying sizes.
Each house is centered around an interior patio or courtyard with a water element like a fountain or pool, with various rooms arranged around it.
[2]: 88 Also located at various points inside this military enclosure were several subterranean chambers, known as mazmorras, that served as dungeons and silos.
Prisoners were typically forced to perform manual labour during the day and then lowered back into the dungeons at night.
The southern ramparts of the Alcazaba became strategically more important in the 15th century as gunpowder artillery became a regular part of siege warfare.
In the 16th century the tower was reinforced with a thicker bastion to better withstand any artillery attacks and to allow the placement of a cannon battery.
The tower was strategically important in monitoring the nearby walls and fortifications and protecting the flank of the larger Torre de la Vela.