Iberism (Aragonese, Basque, Galician, Portuguese and Spanish: Iberismo; ; Catalan and Occitan: Iberisme), also known as pan-Iberism or Iberian federalism, is the pan-nationalist ideology supporting a unification of all the territories of the Iberian Peninsula. It mostly encompasses Portugal and Spain but may also include Andorra, Gibraltar and territories of France such as Northern Catalonia or the French Basque Country. Background and precursors Portugal and Spain share a common history to some degree. Spanish and Portuguese are both Romance languages like Catalan, Galician, Asturleonese and Aragonese, all spoken in the Iberian peninsula. The Portuguese language and Galician languages evolved from the medieval Galician-Portuguese when the County of Portugal separated from the Kingdom of León by becoming the Kingdom of Portugal. On the other hand, the Galician language has become increasingly influenced by the Castilian language since Galicia's incorporation into the Crown of Castile as a dependent Kingdom of León. The identities of both modern Spain and Portugal developed during the experience of the Reconquista. In 1512, Ferdinand II of Aragon conquered the Kingdom of Navarre bringing the territories of what would become known as modern Spain under a common ruler. However Portugal remained an independent kingdom, competing with Spain (Castile) in colonial expansion. To avoid conflict, the Treaty of Tordesillas divided the world into Portuguese and Castilian hemispheres of influence. As a result of the disappearance of Sebastian I of Portugal at the Battle of Alcácer Quibir, Philip II of Spain exerted his dynastic rights and used Castilian troops to overcome the rival pretender. The national poet of Portugal Luís de Camões opposed Philip, but had himself written some sonnets in Spanish (bilingualism was then common in both courts). In 1581, Philip became Philip I of Portugal, joining both crowns into the most extended empire in history up to that time. The Spanish Habsburgs (Philip III of Spain and II of Portugal, Philip IV of Spain and III of Portugal) ruled what has later been called the Iberian Union, a personal union of different kingdoms, including Portugal (with its colonies), Castile (with its colonies), and Aragon. In 1640, the duke of Bragança gathered those restless in Portugal with the support of Cardinal Richelieu of France. His rebellion succeeded and he became the John IV of Portugal. The North African city of Ceuta decided to leave the crown of Portugal and remain under the Spanish king. In 1801, the Portuguese city