There is no reference to the Alhambra as being a residence of kings, until the 13th century, even though a fortress had existed since the 9th century. The first kings of Granada, the Zirites, had their castles and palaces on the hills of the Albaicin, and nothing remains of them. The Nasrites were the emirs that built the Alhambra, starting in 1238.
The complex of palaces; this residence of the kings of Granada was constructed from the ruins of the former fortress, by the founder of the dynasty, Alhamar, who commenced work in the thirteenth century. Mostly the buildings that have survived however, date from the fourteenth century.
The Alhambra became a Christian court in 1492 when the Catholic Monarchs (Ferdinand and Isabel) conquered the city of Granada.