James II, called the Just, was the King of Aragon and Valencia and Count of Barcelona from 1291 to 1327. He was also the King of Sicily (as James I) from 1285 to 1295 and the King of Majorca from 1291 to 1298. From 1297 he was nominally the King of Sardinia and Corsica, but he only acquired the island of Sardinia by conquest in 1324. His full title for the last three decades of his reign was "James, by the grace of God, king of Aragon, Valencia, Sardinia and Corsica, and count of Barcelona" (Latin: Iacobus Dei gracia rex Aragonum, Valencie, Sardinie, et Corsice ac comes Barchinone).
Born at Valencia, James was the second son of Peter III of Aragon and Constance of Sicily. He succeeded his father in Sicily in 1285 and his elder brother Alfonso III in Aragon and the other Spanish territories, including Majorca, in 1291. He was forced to cede Sicily to the papacy in 1295, after which it was seized by his younger brother, Frederick III, in 1296. In 1298 he returned Majorca to the deposed king of Majorca, a different James II, having received rights to Sardinia and Corsica from Pope Boniface VIII. On 20 January 1296, Boniface issued the bull Redemptor mundi granting James the titles of Standard-bearer, Captain General and Admiral of the Roman church.