This article analyzes two of Ibn Darrāj al-Qastallī's famous odes presented to al-Mansūr b. Abī 'Āmir (d. 392/1002) and Mundhir b. Yahyā (d. 412/1022). Applying speech act theory reveals that these odes perform the illocutionary act, to use speech act terminology, of obligating the patron to reward the poet as a symbol of establishing a mutual relationship that is based on the poet's pledge of allegiance and the patron's acknowledgment of obligation toward the poet. The analysis focuses on what the panegyric ode does and what effect it has on the poet and patron within a proper context in the community. The paper uses speech act theory as a general framework for the ritual of gift exchange, which consists of giving (the poem as a gift), receiving (the poem by the patron), and repaying (the poet). This ritual establishes specific obligations between poet and patron that allow the panegyric ode to accomplish specific objectives. The paper also compares the function of each of the two odes in the context of the different political circumstances under which they were presented and shows how these circumstances affect the structure of each ode.