[6] His most significant historical work, The Complete Source on the History of Granada (الإحاطة في أخبار غرناطة),[7][8] written in 1369 AD, which includes his autobiography, has yet to be translated into English.
[6] Shortly after his birth, his father was appointed to a high post at the court of Emir Ismail I in Granada.
[6] For much of his life he was vizier at the court of the Sultan of Granada, Muhammed V. He spent two periods in exile in the Marinid empire (between 1360 and 1362 and 1371–74).
Earlier and modern historians have speculated that his many private and political feuds with the Emirs of Granada belonging to the Nasrid dynasty were probably the main factors in his treatment and execution.
[6] In his treatise about the plague (Muqni'at al-Sā'il 'an al-Maraḍ al-Hā'il, c. 753/1362), ibn al-Khatib explores the idea of transmission of disease through contagion centuries before Louis Pasteur conducted his experiments in Europe.
[11] In his treatise On the Plague, Ibn al-Khatib writes:[12] "The existence of contagion is established by experience [and] by trustworthy reports on transmission by garments, vessels, ear-rings; by the spread of it by persons from one house, by infection of a healthy sea-port by an arrival from an infected land [and] by the immunity of isolated individuals.
He eventually strengthened his position while organizing the expulsion of several of his North African political rivals from Granada.
More importantly, emir Muhammed V had grown distrustful of Ibn al-Khatib for his overbearing control of the Granadan state and his strict loyalty to the Marinids of Morocco.
Feeling the heat rise, in 1371, Ibn al-Khatib left for North Africa, where he was well received by the Marinid sultan Abu Faris Abd al-Aziz I.
The ad hominem nature of al-Nubahi's legal decision strongly suggests that he had a personal grudge against Ibn al-Khatib.