During the reign of the Nasrid sultan Muhammad V in 14th-century Granada, the renowned literary figure Lisan al-Din ibn al-Khatib rose to the office of vizier and chief dignitary. A text on Graeco-Arabic philosophy and Sufism that he wrote under court patronage, Rawdat al-Taʿrif fi al-Hubb al-Sharif (The Garden of Knowledge of Noble Love), became the centerpiece of a famous court case against him that led to his downfall. Historians have had difficulty interpreting the case because of its political context. Was Ibn al-Khatib's demise really about his philosophical and mystical ideas given his entanglement in power rivalries at the court? Scholars have suggested that Ibn al-Khatib's text was used merely as a pretext to remove him from power. In contrast, I argue that the specific power rivalry between the chief qadi and Ibn al-Khatib only escalated into a court case because, at a time when Sufis were controversial, the qadi read Ibn al-Khatib's Sufi-inspired doctrines as a claim on his religious authority. Ibn al-Khatib's ideas, rather than a pretext for prosecution, were the necessary condition for the power rivalry to erupt into a court case. This reading of the case highlights the way intellectual debates shaped contingent political processes in the medieval Islamic world.