The Principality of Catalonia (Catalan: Principat de Catalunya, Latin: Principatus Cathaloniæ, Occitan: Principautat de Catalonha), is a historic territory and a medieval and early modern political entity in the northeastern Iberian Peninsula, mostly in Spain, with an adjoining portion in southern France. Between the 13th and the 18th centuries it was bordered by the Kingdom of Aragon to the west, the Kingdom of Valencia to the south, the Kingdom of France and the feudal lordship of Andorra to the north and by the Mediterranean sea to the east.
The first reference to Catalonia and the Catalans appears in the Liber maiolichinus de gestis Pisanorum illustribus, a Pisan chronicle (written between 1117 and 1125) of the conquest of Minorca by a joint force of Italians, Catalans, and Occitans. At the time, Catalonia did not yet exist as a political entity, though the use of this term seems to acknowledge Catalonia as a cultural or geographical entity.
The counties that would eventually make up the Principality of Catalonia were gradually unified under the rule of the Count of Barcelona. In 1137, the County of Barcelona and the Kingdom of Aragon were unified under a single dynasty, creating what modern historians call the Crown of Aragon; however Aragon and Catalonia retained their own political structure and legal traditions. Because of these legal differences and their use of different language - Aragonese and Catalan - an official recognition of the Catalan Counties as a distinct political entity with its own institutions, laws and political community became necessary.
Under Alfons the Troubador (reigned 1164-1196), Catalonia was regarded as a legal entity for the first time. Still, the term Principality of Catalonia was not used legally until the 14th century, when it was applied to the territories ruled by the Courts of Catalonia.
The principality was variously a realm of the Crown of Aragon (1162–1641, 1652–1714), realm of the Monarchy of Spain (1516–1641, 1652–1714) and a realm of the Kingdom of France (1641–1652).
The term "Principality of Catalonia" remained in use until the Second Spanish Republic, when its use declined because of its historical relation to the monarchy.