Balearic Islands their state. However, the Cordoban emirate disintegrated in civil war and partition in the early eleventh century, breaking into smaller states called "taifa". Mujahid al-Siqlabi, the ruler of the Taifa of Dénia, sent a fleet and seized control of the islands in 1015, using it as the base for subsequent expeditions to Sardinia and Pisa. In 1050, the island's governor Abd Allah ibn Aglab rebelled and established the independent Taifa of Mallorca. For centuries, the Balearic sailors and pirates had been masters of the western Mediterranean. But the expanding influence of the Italian maritime republics and the shift of power
Balearic Islands restored in the 1295 Treaty of Anagni. The tension between the kingdoms continued through the generations until James' grandson James III was killed by the invading army of Peter's grandson Peter IV at the 1349 Battle of Llucmajor. The Balearic Islands were then incorporated directly into the kingdom of Aragon. In 1469, Ferdinand II of Aragon (king of Aragon) and Isabella I of Castile (queen of Castile) were married. After their deaths, their respective territories (until then governed separately) were governed jointly, in the person of their grandson, the Emperor Charles V. This can be considered the foundation of the