In 1137 the Crown of Aragon was created by the marriage of Queen Petronilla of Aragon and Ramon Berenguer IV, Count of Barcelona, after Ramiro II of Aragon ceded the "potestas" of his kingdom and his daughter Petronilla to Barcelona's Count, avoiding and protecting Aragon from a potential invasion and annexion by Castile. Ramon Berenguer IV used the title ""comes Barchinonensis"" (count of the Barcelonians) as his primary title and ""princeps Aragonensis"" (prince of the Aragonians) as his second title, beside his wife who retained her title of "Regina" ("queen"). Their son and heir, Alfonso II of Aragon consolidated the dynastic union as "Rex Aragonum, Comes Barchinone et Marchio Provincie" ("king of Aragon, count of Barcelona, and marquis of Provence"). Catalonia and Aragon retained their distinct traditional rights, and Catalonia its own personality with one of the first parliaments in Europe, the Catalan Courts (Catalan: "Corts Catalanes").