Although Skanderbeg had achieved success in resisting Murad II himself, harvests were unproductive and famine was widespread.
After being rejected by the Venetians, Skanderbeg established closer connections with King Alfonso V who, in January 1451, appointed him as "captain general of the king of Aragon".
Following Skanderbeg's requests, King Alfonso V helped him in this situation and the two parties signed the Treaty of Gaeta on 26 March 1451, according to which Skanderbeg was formally a vassal in exchange for military aid.
Authors have disagreed on whether Krujë belonged to Skanderbeg or to Alfonso V; while C. Marinesco claimed that Krujë no longer belonged to Skanderbeg, but to Alfonso, who exercised his power through his viceroy, this thesis was rejected by A. Gegaj, who claimed that the disproportion in numbers between the Spanish forces (100) and Skanderbeg's (around 10–15 thousand) clearly showed that the city belonged to Skanderbeg.
It is presumed that Skanderbeg de facto had full control over his territories: while Naples' archives registered payments and supplies sent to Skanderbeg, they do not mention any kind of payment or tribute by Skanderbeg to Alfonso, except for various Ottoman war prisoners and banners sent by him as a gift to the King.
More explicitly, Skanderbeg recognized Alfonso's sovereignty over his lands in exchange for help against the Ottomans.
King Alfonso pledged to respect the old privileges of Krujë and Albanian territories and to pay Skanderbeg an annual 1,500 ducats, while Skanderbeg pledged to make his fealty to King Alfonso only after the expulsion of Ottomans from his lands, a condition never reached in Skanderbeg's lifetime.

Skanderbeg married Donika, the daughter of George Arianit Komneni, one of the most influential Albanian noblemen, strengthening the ties between them, a month after the treaty on 21 April 1451 in the Orthodox Ardenica Monastery, Their only child was John Castriot II.

In 1451, Mehmed was focused on defeating the Karamanids and Menteşe in the East, but it was in his intentions to return to Albania.
During this brief period of rest, Skanderbeg took up the rebuilding of Krujë and erected a new fortress in Modrica in the Drin Valley near Svetigrad (which had been lost in a 1448 siege) where Ottoman forces had previously slipped through unhindered.
The fortress was constructed in the heat of summer within a few months when few Ottoman posts were present.
This came as a huge blow to Ottoman efforts whose Albanian operations were thus inhibited.

Right after the Treaty of Gaeta, Alfonso V signed other treaties with the rest of the most important Albanian noblemen, including George Arianit Komneni, and with the Despot of the Morea, Demetrios Palaiologos.
These efforts show that Alfonso thought about a crusade starting from Albania and Morea, which however never took place.
Following the treaty, in the end of May 1451, a small detachment of 100 Catalan soldiers, headed by Bernard Vaquer, was established at the castle of Krujë.
One year later, in May 1452, another Catalan nobleman, Ramon d'Ortafà, came to Krujë with the title of viceroy.
In 1453, Skanderbeg paid a secret visit to Naples and the Vatican, probably to discuss the new conditions after the fall of Constantinople and the planning of a new crusade which Alfonso would have presented to Pope Nicholas V in a meeting in 1453–54.
During the five years which followed the first siege of Krujë, Albania was allowed some respite as the new sultan set out to conquer the last vestiges of the Byzantine Empire, but in 1452 the newly acceded Ottoman Sultan Mehmed II ordered his first campaign against Skanderbeg.
An expedition was sent under the dual-command of Tahip Pasha, the main commander, and Hamza Pasha, his subordinate, with an army of c. 25,000 men split between the two.

Skanderbeg gathered 14,000 men and marched against the Ottoman army.
Skanderbeg planned to first defeat Hamza and then to move around Tahip and encircle him.
Skanderbeg did not give Hamza much time to prepare and, on 21 July, he assaulted immediately.
The f
Although Skanderbeg had achieved success in resisting Murad II himself, harvests were unproductive and famine was widespread. After being rejected by the Venetians, Skanderbeg established closer connections with King Alfonso V who, in January 1451, appointed him as "captain general of the king of Aragon". Following Skanderbeg's requests, King Alfonso V helped him in this situation and the two parties signed the Treaty of Gaeta on 26 March 1451, according to which Skanderbeg was formally a vassal in exchange for military aid. Authors have disagreed on whether Krujë belonged to Skanderbeg or to Alfonso V; while C. Marinesco claimed that Krujë no longer belonged to Skanderbeg, but to Alfonso, who exercised his power through his viceroy, this thesis was rejected by A. Gegaj, who claimed that the disproportion in numbers between the Spanish forces (100) and Skanderbeg's (around 10–15 thousand) clearly showed that the city belonged to Skanderbeg. It is presumed that Skanderbeg de facto had full control over his territories: while Naples' archives registered payments and supplies sent to Skanderbeg, they do not mention any kind of payment or tribute by Skanderbeg to Alfonso, except for various Ottoman war prisoners and banners sent by him as a gift to the King. More explicitly, Skanderbeg recognized Alfonso's sovereignty over his lands in exchange for help against the Ottomans. King Alfonso pledged to respect the old privileges of Krujë and Albanian territories and to pay Skanderbeg an annual 1,500 ducats, while Skanderbeg pledged to make his fealty to King Alfonso only after the expulsion of Ottomans from his lands, a condition never reached in Skanderbeg's lifetime.
Skanderbeg married Donika, the daughter of George Arianit Komneni, one of the most influential Albanian noblemen, strengthening the ties between them, a month after the treaty on 21 April 1451 in the Orthodox Ardenica Monastery, Their only child was John Castriot II.
In 1451, Mehmed was focused on defeating the Karamanids and Menteşe in the East, but it was in his intentions to return to Albania. During this brief period of rest, Skanderbeg took up the rebuilding of Krujë and erected a new fortress in Modrica in the Drin Valley near Svetigrad (which had been lost in a 1448 siege) where Ottoman forces had previously slipped through unhindered. The fortress was constructed in the heat of summer within a few months when few Ottoman posts were present. This came as a huge blow to Ottoman efforts whose Albanian operations were thus inhibited.
Right after the Treaty of Gaeta, Alfonso V signed other treaties with the rest of the most important Albanian noblemen, including George Arianit Komneni, and with the Despot of the Morea, Demetrios Palaiologos. These efforts show that Alfonso thought about a crusade starting from Albania and Morea, which however never took place. Following the treaty, in the end of May 1451, a small detachment of 100 Catalan soldiers, headed by Bernard Vaquer, was established at the castle of Krujë. One year later, in May 1452, another Catalan nobleman, Ramon d'Ortafà, came to Krujë with the title of viceroy. In 1453, Skanderbeg paid a secret visit to Naples and the Vatican, probably to discuss the new conditions after the fall of Constantinople and the planning of a new crusade which Alfonso would have presented to Pope Nicholas V in a meeting in 1453–54. During the five years which followed the first siege of Krujë, Albania was allowed some respite as the new sultan set out to conquer the last vestiges of the Byzantine Empire, but in 1452 the newly acceded Ottoman Sultan Mehmed II ordered his first campaign against Skanderbeg. An expedition was sent under the dual-command of Tahip Pasha, the main commander, and Hamza Pasha, his subordinate, with an army of c. 25,000 men split between the two.
Skanderbeg gathered 14,000 men and marched against the Ottoman army. Skanderbeg planned to first defeat Hamza and then to move around Tahip and encircle him. Skanderbeg did not give Hamza much time to prepare and, on 21 July, he assaulted immediately. The f
Skanderbeg