Tashfin ibn Ali was appointed Governor of Granada and Almería in 1129, as well as of Córdoba in 1131, during the reign of his father Ali ibn Yusuf. He succeeded his father in 1143. In 1145, he went to fight the Almohads, under the leadership of Abd al-Mu'min, in the Oran area. He was besieged for several days by the Almohad forces and finally opted for escaping by sea. He subsequently called on a fleet from Almeria, burned his military encampment and while trying to join the port by night on horseback, he fell off a cliff and died in March 1145. He was succeeded first by his son Ibrahim ibn Tashfin, who was still an infant, and soon after by his brother Ishaq ibn Ali.