Question: What Persian general took advantage of Nasr ibn Sayyar being preoccupied with a civil war? 

The Sixth Siege of Gibraltar in 1411 was the only occasion on which control of Gibraltar was contested between two Islamic powers.  After the failed Fifth Siege of Gibraltar in 1349–50, which ended with the death of King Alfonso XI of Castile from bubonic plague, the Kingdom of Castile was preoccupied with the Castilian Civil War and its aftermath.  In 1369, Sultan Muhammed V of Granada took advantage of the Castilians' distractions and in the Siege of Algeciras (1369) he seized the city of Algeciras, on the west side of the Bay of Gibraltar, which Alfonso XI had captured in 1344.  After razing it to the ground he made peace with Henry II, the winner of the civil war.  The truce was renewed by Henry's successors John I and Henry III.  At some point during the truces, control of Gibraltar was transferred from the Marinid dynasty of Morocco, which had held it since 1333, to the Granadans.  It is not clear why this happened; it may have been as a condition of the Granadans assisting the Marinids against rebels in Morocco. <SEP>  His last years were occupied by intertribal rivalries and uprisings, however, as the Caliphate itself descended into a period of civil war. Naṣr ibn Sayyār al-Lāythi al-Kināni (Arabic: نصر بن سيار الليثي الكناني‎ ‎ ; 663–748) was an Arab general and the last Umayyad governor of Khurasan in 738–748.  Nasr played a distinguished role in the wars against the Turgesh, although he failed to decisively confront the rebellion of al-Harith ibn Surayj in its early stages.  Although respected as a soldier and a statesman, he owed his appointment as governor more to his obscure tribal background, which rendered him dependent on the Caliph.  His tenure was nevertheless successful, as Nasr introduced long-overdue tax reforms that alleviated social tension and largely restored stabilized Umayyad control in Transoxiana, which had been greatly reduced under the Turgesh onslaught.  In 746 Nasr was driven from his capital by Ibn Surayj and Juday' al-Kirmani, but returned after the latter fell out among themselves, resulting in Ibn Surayj's death.  Preoccupied with this conflict, Nasr was unable to stop the outbreak and spread of the Abbasid Revolution, whose leader, Abu Muslim, exploited the situation to his advantage.  Evicted from his province in early 748, he fled to Iran pursued by the Abbasid forces, where he died on 9 December 748. <SEP> Abu Muslim Abd al-Rahman ibn Muslim al-Khorasani or al-Khurasani (Arabic: أبو مسلم عبد الرحمن بن مسلم الخراساني‎ ‎ born 718-19 or 723-27, died in 755), born Vehzādān Pūr-i Vandād Hormoz (Persian: وهزادان پور ونداد هرمزد‎ ‎ ), was a Persian general in service of the Abbasid dynasty, who led the Abbasid Revolution that toppled the Umayyad dynasty. <SEP> Thimbron or Thibron (Greek: Θίμβρων ; fl.  400–391 BC) was a Lacedaemonian general.  He was sent out as harmost in 400 BC, with an army of about 5,000 men, to aid the Ionians against Tissaphernes, who wished to bring them into subjection.  Thibron raised a substantial force of Peloponnesian troops and levies from other cities around Greece, but was initially unable to face the Persian army in the field.  After he was joined by elements of the Ten Thousand, he challenged and defeated the Persian army on several occasions; seizing several cities before settling in to besiege Larissa.  That siege proved fruitless, and Thibron was ordered to abandon it, and then replaced by another general, Dercylidas, before he could launch his next campaign.  Upon his return to Sparta Thibron was tried and exiled for allowing his troops to plunder Sparta's allies in the region.  In 391 BC, during the Corinthian War, Thibron was again dispatched to Ionia with an army, and was ordered to take aggressive action against the Persian satrap Struthas, who was pursuing a pro-Athenian, anti-Spartan policy.  Thibron launched a number of successful raids into Persian territory.  His raids tended to be poorly organized, however, and Struthas took advantage of this to ambush one of Thibron's raiding parties.  The Spartans were routed, and a large number of them, including Thibron, were killed.