Muhammad V of Granada

Abu Abdallah Muhammad V (أبو عبد الله محمد الخامس) (4 January 1339 – 16 January 1391), known by the regnal name al-Ghani bi'llah (الغني بالله), was the eighth Nasrid ruler of the Emirate of Granada in Al-Andalus on the Iberian Peninsula.

He ruled between 1354–1359 and 1362–1391. His reign was part of the golden age of Nasrid rule. His architectural patronage also contributed some of the most famous elements of the Alhambra in Granada, including the Palace of the Lions.

Early life
Muhammad V was the eldest son and heir of Yusuf I ((r. 1333 – 1354)) by his slave Butayna, born on Sunday, 4 January 1339. He also had a younger full-blood sister, A'isha, two half brothers and five half-sisters.

Reign
Muhammad V's father and predecessor, Yusuf I, was murdered suddenly in 1354 while at prayer in the congregational mosque of Granada, by a civilian described as a "madman". Muhammad V was 16 years old at the time and still a minor. Accordingly, state affairs were managed by the hajib (chamberlain) Ridwan (who had also served his father), the vizier Ibn al-Khatib, and the commander of the Ghazis, Yahya ibn Umar ibn Raḥḥu. Together, they maintained a policy of peace with Castile, paying tribute and providing military assistance against Castile's enemies when requested, such as against Aragon in 1359.

Muhammad V's reign was interrupted by a palace coup in August 1359 that placed his half-brother, Isma'il II ((r. 1359 – 1360)), on the throne. Muhammad V escaped to Guadix, where he had support from the local garrison, but was unable to rally further support from Almeria or from Peter I, the Castilian king. He moved on and took refuge at the court of the Marinid ruler Abu Salim in Fez (present-day Morocco). Isma'il II was soon assassinated in June 1360 by one of his former co-conspirators, a cousin named Abu 'Abd Allah Muhammad, who took the throne as Muhammad VI ((r. 1360 – 1362)).

While in Fez, Muhammad V was accompanied by Ibn al-Khatib, who remained loyal to him. Both men also met Ibn Khaldun, who supported their cause. Eventually, Muhammad V secured the support he needed from Peter of Castile. With the support of Peter, of Uthman ibn Yahya ibn Raḥḥu (the son of Yahya ibn Umar ibn Raḥḥu), and of another figure named Ali ibn Kumasha, he returned to the Iberian Peninsula in 1362. Peter and Muhammad V's forces marched on Granada, capturing various towns and the important city of Málaga. With his fortunes turning for the worse, Muhammad VI, reportedly on the advice of his allies, surrendered himself to Peter of Castile and asked for mercy. Peter executed him instead, leaving his ally Muhammad V to reclaim the throne in 1362.

After his return to power, Muhammad V continued his policy of peace with Castile and remained pragmatic. Under his rule, Nasrid diplomacy was exceptionally effective, even amidst the convoluted politics of the Iberian Peninsula in this era. The ongoing Castilian Civil War meant that Castile was not in a position to threaten Granada. Muhammad V initially supported Peter, his former ally, against his rival, Henry of Trastámara. He sent troops to help Peter, which provoked Henry's Aragonese allies into attacking Granadan ships at sea. Muhammad V, in turn, used these Christian attacks to solicit materials and funds from Musa II, the Zayyanid sultan in Tlemcen. When Henry captured Seville in 1366, forcing Peter to flee north, Muhammad V adapted by negotiating a new peace with him. When Peter returned to Seville in 1367, Muhammad V again renewed his loyalty to him. When Peter was assassinated in 1369, leaving Castile in further chaos, Muhammad V took advantage of the situation to recapture Algeciras that year. He destroyed the city and from then on its former territory became attached to Gibraltar instead.

Muhammad V's reign, along with that of his father, Yusuf I, is considered a golden age of the Nasrid emirate. The emirate was relatively free of internal conflict during his second reign. Among his domestic reforms, Muhammad V eliminated the office of the, the chief of the Ghazis, in 1370, placing the Zenata troops under the direct command of the Nasrid family for the first time.

Culture and patronage
Muhammad V's reign also period marked the pinnacle of Nasrid culture. The vizier Ibn al-Khatib (d. 1375) was a major figure of literature, as was his successor, Ibn Zamrak (d. 1392). After meeting him in Fez, Muhammad V welcomed Ibn Khaldun to his court in Granada and used him as an ambassador to Seville in 1363. His reign was also a high point of cultural exchange with the Castilian court of Peter in Seville, who built his palace in the Alcazar in the style of Granada's art and architecture.

Within the Nasrid citadel and palace complex in Granada, the Alhambra, Muhammad V undertook major construction projects and renovations, most notably the Palace of the Lions.' He also rebuilt the Mexuar section and refurbished the Comares Palace, including the creation of the ornate entrance façade in the Patio del Cuarto Dorado ('Courtyard of the Gilded Room').' For the general population in the city, Muhammad V sponsored the construction of a hospital (maristan), the Maristan of Granada, between 1365 and 1367. It was one of the earliest European hospitals that also included care for the mentally ill.

Death
Muhammad V died on 16 January 1391. He had at least four sons; Yusuf II, Nasr, Muhammad and Sa'd. He was succeeded by his son, Yusuf II. Muhammad V's death marked an end to the Nasrid dynasty's golden years. Until its fall in the late 15th century, the dynasty became embroiled in succession disputes, rivalries, and assassinations.