The history of the Alhambra building complex, however, stretches right back in Islamic times to the 9th century. We first learn of the existence of the “Red Fort” (for that is what al-hamra means) around 860, though nothing remains of this today. The earliest buildings of the Alhambra that can be dated are from the 11 th century, from the time of the Zirid dynasty, under which a forerunner of the Alcazaba came into being. The present area of the Alhambra, with its wall and its earliest towers in position, began to take shape under the Nasrids, the last Islamic sultanate on the Iberian Peninsula, in the first few decades of the 13th century. The dynasty had made the southern Spanish city of Granada the capital of its kingdom. For a long time, the sultanate was able to exist alongside the Christian rules by means of a skillful policy of treaties, vassalage, and military campaigns, while at the same time being adept at furthering its own cultural development. Construction of the Generalife, a summer palace near the Alhambra that underwent many alterations by subsequent sultans, probably started at the beginning of Nasrid rule. At the beginning of the 14th century, Muhammad III (1302-1309) contributed to the infrastructure of the city center, the Medina, with the construction of the mosque, the adjoining baths, the rauda (the sultans mausoleum), and the Puerta del Vino (“Wine Gate”), where the main street, the Calle Real, left the city. The actual palace area of the Nasrids was first developed under Ismail I (1314—1325). There are still significant remains of his palace, hidden among the palaces of the second half of the 14th century. The middle of the 14th century saw the sultanates most fertile period under Yusuf I (1333—1354). He built the Palacio de Comares (“Comares Palace”), the city gates of the Puerta de la Justicia (“Gate of Justice”) and the Puerta de los Siete Suelos (“Gate of the Seven Stories”), and, among other things, the wonderful Torre de la Cautiva (“Tower of the Captives”). The golden age of the Nasrid dynasty was undoubtedly that of Muhammad V in his second reign (1362-1391). The Riyad Palace also known as the Patio or Palacio de los Leones (“Court of the Lions” or “Palace of the Lions”) — owes its existence to him. In terms of architecture and wall decoration, this is one of the masterpieces of Islamic culture. The present appearance of the Alhambra is the work of Muhammad V, for it was in his reign that buildings were decorated and many more were erected. During the 15th century, the sultans time was increasingly taken up with the advancing Christian armies rather than artistic creativity. As a result, this was a period of decline, with no significant construction work and with no innovation in terms of building ornamentation. Before that, however, Muhammad VII (1392—1408) built the Torre de las Infantas (“Towers of the Infantas”) on the city wall, and Yusuf III (1408—1417) made alterations to the Generalife and built his own palace in the part of the palace area called the “Partal.” When the Christians captured the city at the end of the 15 th century, they reinforced the city wall and the major gateways with circular bastions, so that they could better withstand an artillery attack. The Christian governors made alterations primarily to the houses and the urban structure, adapting them to their own requirements. These works also affected the palaces, as the Patio de la Reja and the Patio de Lindaraja illustrate. The Palace of Charles V, a jewel of the European Renaissance, is the 16th century’s major contribution to the Alhambra, and represents a counterpoint to the Moorish buildings. Planned in 1526 as an imperial palace on the Alhambra, it was never actually completed. The Convento de San Francisco (“Monastery of St. Francis”), the beautiful Charles V fountain at the Puerta de la Justicia, and the Puerta de las Granadas (“Pomegranate Gate”) on the ascent to the palace complex, are also Renaissance contributions to the Alhambra. In 1576, the Friday Mosque was demolished and replaced by the Church of S. Marfa de la Alhambra, which was completed in 1617.