In 1088 Yusuf ibn Tashfin crossed the Strait of Gibraltar for the second time, but was defeated at the siege of Aledo and suffered the desertion of many of the rulers of the taifas. When the emir came again to the peninsula, he decided to depose all the taifa rulers and became the sole king of the entire Al-Andalus territory. Thanks to the Muslim defeat in Aledo, Alfonso VI had been able to resume the collection of the "parias" by threatening the ruler of the city that he would chop all the trees in the territory of Granada and then went to Seville to subjugate the city again. Abdallah ibn Buluggin of Granada had distanced himself definitively from Yusuf ibn Tashfin and Alfonso VI promised to help him in exchange of his submission.