of the Sassanid Palace near Ctesiphon), according to Beelaert (2010) "elicits a warning about the transience of royal courts." Upon his return, Khaqani was immediately detained by Manuchihr's successor Akhsitan I. To memorialize his incarceration in verse, Khaqani composed his most powerful anti-feudal poems in a genre that will later become known as habsiyāt (prison poetry). In total, five of his poems describe his ordeal in prison. One of the poems, widely known as the "Christian" qasida, is considered by Gould (2016) to be "one of his boldest acts of literary rebellion". Minorsky (1945) identified Andronicus Comnenus as the patron to whom Khaqani addressed this poem. Between 1173–1175, Khaqani composed odes in honor of the Shirvan victory over the Russians, in which he reports the locations and details of the operations, including the destruction of 73 Russian ships. His personal life at this time was filled with tragedy. He suffered several family bereavements, including the death of his first wife, and his young son, Rashid-al-Din. Khaqani composed elegies lamenting their deaths. About the same time, Khaqani went on a second pilgrimage, after which he retired from court life to settle at Tabriz. According to accounts of him in various biographical works on poets, the date of his death ranges from 1186 to 1199. According to the gravestone in Tabriz, Khaqani died in Shawwal 595, corresponding to July 1199. Work and legacy Khaqani's Divān contains qasidas (both panegyrics and non-panegyric odes), tarjiʿāt (strophic poems), ghazals (profane love poems), and rubaʿis (quatrains). His other famous work, Tohfat al-ʿErāqayn, originally titled Khatm al-gharāʾeb ("Curious Rarities"), is written in couplet form (mathnawi) and is over three thousand verses long. This book serves as an autobiography and also presents his impressions of the Middle East. Beelaert notes that, although the work is a mathnawi, it exhibits more affinities with his other qasidas. His surviving prose works include the prose introduction to the aforementioned mathnawi, and approximately sixty letters attributed to him. Khaqani lived within a partly Christian milieu, and according to Beelaert, he was "a product of the culturally complex milieu of the Caucasus." He established friendly contact with Byzantine, Armenian and Georgian royalty. His poetry is sometimes profused with Christian imagery and symbols, and according to Lewis (2009), he "imbues his Christian images with a positive aura and an insider's knowledge of Christianity." It is often believed that Khaqani's complex mode of expression has