Ibn Ammar became vizier to the taifa of Seville. Though he was poor and unknown, his skill in poetry brought him the close friendship of the young Abbad III al-Mu'tamid. However, Al-Mu'tamid's father, Abbad II al-Mu'tadid disapproved of the relationship and sent him into exile.
Al-Mu'tamid named him prime minister some time after the death of his father. Ibn Ammar was reputed to be unbeatable at chess; according to Abdelwahid al-Marrakushi, his victory in a game convinced Alfonso VI of Castile to turn away from Seville.
He engineered the annexation of the taifa of Murcia to the kingdom of Seville, and convinced al-Mu'tamid to name him as its governor. He proclaimed himself its king and cut off relations with al-Mu'tamid. He soon fell from power, was captured in an ambush, and was imprisoned in Seville. Al-Mu'tamid was initially inclined to forgiveness, but was later incensed by something he read in an intercepted letter sent by Ibn Ammar from his prison cell. The king then killed the poet with his own hands.
- "Ibn ʿAmmār". 24 April 2012.
- Boswell, John (2015). Christianity, Social Tolerance, and Homosexuality: Gay People in Western Europe from the Beginning of the Christian Era to the Fourteenth Century. University of Chicago Press. p. 196. ISBN 978-0-226-34536-9.
- Hitti, Philip K. History of the Arabs: From the Earliest Times to the Present (London: Macmillan, 1956)
- Sordo, Enrique Moorish Spain: Cordoba, Seville, Granada. (London: Elek Books, 1963)
- Watt, W. Montgomery A History of Islamic Spain (Edinburgh: Edinburgh University Press, 1965)