Muhammed II al-Faqih was the son and heir of Mohammed ibn Alhamar and the second Nasrid ruler of the Emirate of Granada in Al-Andalus on the Iberian Peninsula.
Muhammed II was born in the Arjuno region of the Andalusian province of Jaen in 1234 and succeeded his father in 1273. He served as a vizier during his father’s Sultanate. Known as "al-Faqih" or the lawgiver, he continued architectural work at the Alhambra. He was literate and often wrote his own letters of state. His cousin Abu Said Faraj became a trusted advisor and married one of Muhammed II al-Faqih's daughters, the princess Fatima.
Muhammed II al-Faqih's reign continued the civil war between his family and a rival clan, the Ashqilula. When the last Ashqilula governor of Malaga, Abu Muhammad rebelled, Muhammed II al-Faqih took the city in 1278. In 1278, with the defeat of his rivals, Muhammed II al-Faqih awarded the governorship of Malaga to his cousin and son-in-law, Abu Said Faraj. Later, the majority of the Ashqilula clan fled to Morocco in AH or 1279 CE.
Muhammed II al-Faqih had at least three sons Faraj, Muhammed III and Nasr, the latter the son of a Christian concubine. The second Nasrid ruler died on April 8, 1302, after his son Muhammed III, allegedly had him poisoned. He died after completing the mid-afternoon prayer and seemed to be suffocating just prior. Earlier that afternoon he had received a cake from the household of his son Muhammed III. Muhammed II was rapidly buried in the sultan's garden after his poisoning.