Averroes remained in royal favor but in 1195 his fortune reversed. Various charges were made against him and he was tried by a tribunal in Córdoba. The tribunal condemned his teachings, ordered the burning of his works and banished Averroes to nearby Lucena. Early biographers's reasons for this fall from grace include a possible insult to the caliph in his writings but modern scholars attribute it to political reasons. The Encyclopaedia of Islam said the caliph distanced himself from Averroes to gain support from more orthodox ulema, who opposed Averroes and whose support al-Mansur needed for his war against Christian kingdoms. Historian of Islamic philosophy Majid Fakhry also wrote that public pressure from traditional Maliki jurists who were opposed to Averroes played a role. After a few years, Averroes returned to court in Marrakesh and was again in the caliph's favor. He died shortly afterwards, on 11 December 1198 (9 Safar 595 in the Islamic calendar). He was initially buried in North Africa but his body was later moved to Córdoba for another funeral, at which future Sufi mystic and philosopher Ibn Arabi (1165–1240) was present. Works Averroes was a prolific writer and his works, according to Fakhry, "covered a greater variety of subjects" than those of any of his predecessors in the East, including philosophy, medicine, jurisprudence or legal theory, and linguistics. Most of his writings were commentaries on or paraphrasings of the works of Aristotle that—especially the long ones—often contain his original thoughts. According to French author Ernest Renan, Averroes wrote at least 67 original works, including 28 works on philosophy, 20 on medicine, 8 on law, 5 on theology, and 4 on grammar, in addition to his commentaries on most of Aristotle's works and his commentary on Plato's The Republic. Many of Averroes's works in Arabic did not survive, but their translations into Hebrew or Latin did. For example, of his long commentaries on Aristotle, only "a tiny handful of Arabic manuscript remains". Commentaries on Aristotle Averroes wrote commentaries on nearly all of Aristotle's surviving works. The only exception is Politics, which he did not have access to, so he wrote commentaries on Plato's Republic. He classified his commentaries into three categories that modern scholars have named short, middle and long commentaries. Most of the short commentaries (jami) were written early in his career and contain summaries of Aristotlean doctrines. The middle commentaries (talkhis) contain paraphrases that