In 1074, Alfonso VI's vassal and friend Al-Mamun, king of the Taifa of Toledo died of poisoning in Córdoba, and was succeeded by his grandson Al-Qádir, who asked for help from the Leonese monarch to end an uprising against him. Alfonso VI took advantage of this request to besiege Toledo, which finally fell on 25 May 1085. After losing his throne, Al-Qádir was sent by Alfonso VI as king of the Taifa of Valencia under the protection of Álvar Fáñez. To facilitate this operation and to recover payment of the "parias" owed by the city, which had failed to pay him since the previous year, Alfonso VI besieged Zaragoza in the spring of 1086. In early March, Valencia accepted the rule of Al-Qádir; Xàtiva resisted requesting the aid of the rulers of Tortosa and Lérida until he was forced to do so. Their raid of the region failed, and they withdrew under harassment by the troops of Fáñez.