Balearic Islands having partitioned his domains between his sons in his will. The will created a new Kingdom of Mallorca from the Balearic islands and the mainland counties of Roussillon or Montpellier, which was left to his son James II. However, the terms of the will specified that the new kingdom be a vassal state to the Kingdom of Aragon, which was left to his older brother Peter. Chafing under the vassalage, James joined forces with the Pope Martin IV and Philip III of France against his brother in the Aragonese Crusade, leading to a 10-year Aragonese occupation before the islands were
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