 He was held in great esteem by Samuel ha-Nagid and his son Joseph, and after the latter's death (1066), Ibn Ghayyat was elected to succeed him as rabbi of Lucena, where he officiated until his death.He was the author of a compendium of ritual laws concerning the festivals, published by Bamberger under the title of "Sha'arei Simḥah" (Fürth, 1862; the laws concerning Passover were republished by Zamber under the title "Hilkhot Pesaḥim," Berlin, 1864), and a philosophical commentary on Ecclesiastes, known only through quotations in the works of later authors.Ibn Ghayyat's greatest activity was in liturgical poetry; he was an author of hundreds of piyyutim, and his hymns are found in the Maḥzor of Tripoli under the title of "Siftei Renanot."