His growing authority created frictions within the ruling family. In March 1464, his brother Muhammad fled to Castilian territory, fearing arrest. Later that year, supported by influential court factions, including elements of the
Banu al-Sarraj, Abu al-Hasan deposed his father and took control of Granada, expelling Sa'd from the Alhambra around September 7, 1464. The threat of Castilian intervention soon led to a reconciliation between father and son. Sa'd was restored in title but retained little power and resided in Almería until his death in August 1465. Others soon challenged Abu al-Hasan’s rule. His brother Yusuf attempted to seize power but later reconciled with him, only to die in 1467. Meanwhile, shifting political conditions in Castile led to renewed truces. In April 1465, a five-year truce was agreed, followed by additional agreements in 1469 and subsequent years, although these often applied unevenly along the frontier. In 1468, a revolt broke out in Málaga under a local leader known in Castilian sources as Mahomat Quircot. The rebellion gained support from Henry IV and members of the Banu al-Sarraj and continued until 1473. Around 1470, unrest among provincial governors intensified, with many belonging to the same powerful family. These uprisings were partly in response to Abu al-Hasan’s efforts to reduce local autonomy and reassert central authority. His measures included replacing officials, reclaiming lands alienated from the royal domain, reducing military pay, and confiscating opponents' property. Abu al-Hasan eventually restored a degree of stability after suppressing the revolts. This period, roughly from the mid-1460s to the early 1480s, saw economic recovery and administrative continuity. Coinage was minted in his name, including gold dinars, silver, and copper. During these years, he conducted military operations along the frontier and took advantage of divisions among Andalusi leaders and Castilian factions. In December 1471, he concluded an alliance with the
Count of Cabra. On January 21, 1472, he signed a three-year general peace treaty with Castile, which included provisions against supporting internal rebels. After Henry IV died in 1474, the succession of Isabella and Ferdinand did not immediately change the situation. The new rulers maintained truces with Granada while fighting elsewhere. Agreements were concluded in 1475, extended in 1476, and renewed in 1478. Frontier incidents remained frequent. In 1477, Abu al-Hasan raided
Cieza in response to Castilian violations of the peace and took 2000 inhabitants captive. This action contributed to a new treaty in January 1478, which notably did not require Granada to pay tribute. In January 1481, the truce was renewed for another year. The union of Castile and Aragon through the
Treaty of Alcacovas (1479) and the resolution of Castile's conflict with Portugal shifted the strategic balance. The Catholic Monarchs were now free to direct their full resources against Granada. Aware of the change, Abu al-Hasan took the initiative and reconquered
Zahara de la Sierra on December 27, 1481. Castile responded by capturing
Alhama on February 28, 1482, a decisive blow that severed the main route between Granada and its western territories. Three successive attempts in March, April and July failed to retake Alhama. However, Abu al-Hasan won a significant victory at Loja in July 1482, routing the Castilian army and capturing considerable artillery and supplies. ==Overthrow==